How do I change attribute upon motion stopping

JamesZeppelinJamesZeppelin Member Posts: 1,927
edited November -1 in Working with GS (Mac)
I have a game where an actor comes to a halt do to drag. If he didnt hit the goal i need the level to fail (basically change an attribute).

How would i go about the actor changing the attribute under those circumstances

Im sure it can be done but i just cant figure it out.

Comments

  • synthesissynthesis Member Posts: 1,693
    Try this:
    when self.velocity.X (or Y) is < 1
    and game.actorsCollided = false

    then

    game.actorFellShortOfTarget = true
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    yeah i ended up doing something really similar after playing with it a couple hours.

    The main problem was i just somehow missed the fact that we had x and y velocity self attributes to work with..... Once i realized that it made it alot easier. I always seem to miss something obvious

    I also used something i found on a post you had started to bring the actor to a stop at a certain speed. FMG had suggested the < 1, > -1 thing and it helped move thngs along without having to play with drag for two hours or more like i usually do.

    thanks!
  • synthesissynthesis Member Posts: 1,693
    Good deal...
    BTW, if you ever post a question and find the solution yourself...post it...
    Usually it will help everyone else too!!!
Sign In or Register to comment.