help control walking speed

ashtmjashtmj Member, PRO Posts: 405
edited November -1 in Working with GS (Mac)
So I have a enemy who I want to walk at a maximum speed of 50, I was going to use apply max speed, but the problem there is then if he falls of a ledge he doesn't fall nearly fast enough.

I tried doing this: constrain> self motion> linear x to: max(50,min(-50))
but it isn't working.

can anyone help with this? or have a better solution?

Thanks :)

Comments

  • icanmakeicanmake Member Posts: 466
    maybe try

    if self.motion.linear.y = 0
    change attribute max speed to 50

    otherwise

    change attribute max speed to ___(whatever you want your max falling speed to be)____
  • ashtmjashtmj Member, PRO Posts: 405
    Woooo! worked like a charm :)
    I ended up doing this:

    If Self.linear y is equal or greater then -35 change max speed to 50
    other wise max speed =200

    Thanks so much
Sign In or Register to comment.