move an actor : add speed subtract speed
tiesto
Member Posts: 122
hello .
so i want to know what i had to do so when the game begin my actor move right and every 5 seconds his speed increases.
for exemple the game start his speed 100 after 5 secondes his speed 150 .
and when he touch a specific actor (obstacle) his speed decreases.
for exemple his speed 100 and when he collide with obstacle actor his speed 50.
thanks.
so i want to know what i had to do so when the game begin my actor move right and every 5 seconds his speed increases.
for exemple the game start his speed 100 after 5 secondes his speed 150 .
and when he touch a specific actor (obstacle) his speed decreases.
for exemple his speed 100 and when he collide with obstacle actor his speed 50.
thanks.
Comments
Behavior Move
Direction 0
Speed self.speed
------------------
Behavior Time
Every 5 seconds
Behavior Change Attribute
self.speed to self.speed+50
------------------
Rule
If actor1 collides or overlaps with actor2
Behavior Change Attribute
self.speed to self.speed-50