slow down an actor

patapplepatapple Member Posts: 873
edited July 2012 in Working with GS (Mac)
Hi,

i need to slow down an actor when a specific attribute is true. i did when attribute is true, constrain self.motion.velocity.x to self.motion.velocity.x-100 and the same thing for the Y but it doesn't work. i have also used change attribute but it doesn't work.
i want that the actor maintains the direction but i want that his speed is decreased a little bit.

any idea?

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    @patapple … don't know what controls the actor's motion but…

    you could try …
    Rule: when
    Attribute: whatever is true
    -changeAttribute: self.Physics.Drag To: 10 or what works

    this will slowDown the actor on both the X and Y axis … eventually will stop motion

    image MH

Answers

  • EpicEpic Member Posts: 89
    edited July 2012
    hey i have an idea first create a index attribute and set it to 200 or whatever you want the speed to be then in the actor you want to accelerate

    put when the attribute is true (i mention it below) add a accelerate behaviour and for the speed use the index attribute then put the direction you want it to travel

    create a round rules actor and a another attribute (true and false one) then put the round rules actor in the scene and say when the attribute (true and false) is true put a timer saying every 0.3 seconds change the index attribute to the index attribute - 10 say after 3 seconds or how long you want it to travel for change attribute to false.

    you will have to tweak it
Sign In or Register to comment.