slow down an actor
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?
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
-
MotherHoose Posts: 2,456
@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
MH
Answers
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