Page 1 of 1

Little Green Lady

PostPosted: Sat Dec 15, 2012 11:37 am
by ESL
This is based on a childhood dream where a little green lady chased me up and down the halls of school as I ran in fear just staying in front of her. In the end, she was trying to push me into a whirlpool but I woke up before she could.

So how can I make the lady chase a character and possibly catch him? He should be able to stay ahead of her while he dodges obstacles and turn corners.

Re: Little Green Lady

PostPosted: Sat Dec 15, 2012 8:38 pm
by skydereign
Well, your game doesn't have corners in it at all. The method of having an actor chase another depends on what kind of movement is required. If the ged you posted is an indication of the level, all you need to do is set the green lady's xvelocity to move in the direction of the player, and perhaps increase the xvelocity. If you want the player to move in two dimensions without walls, you can use angle and directional_velocity in a similar way. Another method would be to use MoveTo, this allows the green lady to chase the player and avoid a single actor (though it can be a bit buggy). The last method that I'd suggest is to have the player create little path nodes every second or so. That way the green lady can use MoveTo to the path nodes, and delete the current node on move finish (and if there are no path nodes, move to the player).