Monsters keep slowing down
#1
Posted 26 February 2012 - 08:16 PM
#2
Posted 26 February 2012 - 08:21 PM
~Blaze
Edited by Blazingocean, 26 February 2012 - 08:22 PM.
#3
Posted 26 February 2012 - 08:28 PM
move_towards_point(obj_man.x, obj_man.y,4)
if(obj_man.x<x)
{
sprite_index = spr_eye
}
else
{
sprite_index = spr_eyeRight
}
#4
Posted 26 February 2012 - 08:33 PM
Edited by TheouAegis, 26 February 2012 - 08:33 PM.
#5
Posted 26 February 2012 - 08:44 PM
#6
Posted 26 February 2012 - 09:23 PM
#7
Posted 26 February 2012 - 09:33 PM
#8
Posted 26 February 2012 - 09:43 PM
You can upload to media fire, or any other uploading page and then post a link.That is the only code for the monster the rest is just drag and drop collision events. i would just put up the whole game but it seems you can attach files on this forum as far as i can tell
#10
Posted 26 February 2012 - 09:55 PM
#11
Posted 26 February 2012 - 10:05 PM
#12
Posted 26 February 2012 - 10:07 PM
okay found the problem and cleaning up code one sec.I messed with it some more and it seems that they move towards the player but its off center. like i could be standing on the far right but the enemies thing im somewhere in the middle area, as soon as i move farther to the left they move to the left also. i don't know if that helps but i though i should say.
#13
Posted 26 February 2012 - 10:16 PM
#14
Posted 26 February 2012 - 10:43 PM
uh... i am having problems... i have cleaned up the code and down some random stuff to help, but from what i can tell when a enemy toucjes another enemy, is slows down. Whats worse about that is there is NO collision event with other enemys....Wow that was really fast. You saved me.
#15
Posted 26 February 2012 - 10:51 PM
#16
Posted 27 February 2012 - 12:21 AM
#17
Posted 27 February 2012 - 01:04 AM
Edited by amiel, 27 February 2012 - 01:21 AM.
#18
Posted 27 February 2012 - 02:11 AM
#19
Posted 27 February 2012 - 08:08 AM
The problem appears to be that obj_display has obj_man as the parent (probably set by accident.) When you tell monsters to go toward obj_man, they will look for an instance of obj_man (including child objects), finds obj_display and happily go there. Obj_display is basically invisible but resides to the left of player, so all monsters will end up in piling up on that position.
(Since monsters are told to go to the object diagonally while can only move on a floor, they basically get slower and slower as they come closer to the target's x and eventually stops when their x coordinates come equal.)
By the way, there is other potential issue that a bullet isn't destroyed when it goes out of the room. It will cause other problems if you keep shooting to the sky.
Edited by torigara, 27 February 2012 - 09:01 AM.
#20
Posted 27 February 2012 - 08:05 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











