Actor's don't stop Moving sometimes

danayeldanayel Member Posts: 25
edited November -1 in Tech Support
I have a game where some actors move out 30-50px stop, then move back and destroy themselves (if not clicked by the player)

Think of it like whack a mole. They pop up, wait a second, then pop down.

But what is happening is that some of them continue to move past the set point.

I am using the "Move to" behavior, and setting it to the desired distance. (Run to completion not checked)

The slower I have the speed set to, the more likely they are to behave properly. But on the higher difficulty levels of my game, the actors regularly shoot off the screen. It happens maybe 1 in 3 or 4 actor spawns on the fastest setting.

Any ideas?

Should I use move to point? Which would be a pain in the proverbial because there are a lot of actors and a lot of points.

Do you think I would be better off putting a time on the movement instead?

Comments

  • synthesissynthesis Member Posts: 1,693
    the move to is buggy I have found over around 250 speed.
    try change velocity and then when Y = your target...self.velocity.Y = 0
    then after 1 second, change velocity again in the other direction and when Y = your starting point...self.velocity.Y = 0 again.

    then set you "whack" rules when you launch it. if whacked...add to the score and self.Position.Y = your starting point and velocity =0.

    make sense?
  • danayeldanayel Member Posts: 25
    Cheers Synthesis. I will give that a go.
Sign In or Register to comment.