When attribute it true stop actor from moving
3absh
Member Posts: 601
An actor is moving using the interpolate behavior from A to B
I want the actor to stop moving entirely when an attribute is true
Comments
You can't stop interpolate behavior once its triggered as it taken out of the engine.
Hmm. Socks answered this exact question a short time ago.
Let me search and see if I can find it.
@tenrdrmer posted a demo in this thread back a few years ago. Probably worth a read!
http://forums.gamesalad.com/discussion/36560/how-to-stop-interpolate-half-way-through-action
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
A fast way:
Use "move to" behavior instead of "interpolate".
.... inside the actor:
rule : if attribute = true
change attribute - self.linear velocity = 0
Our games: Android | iOS | Indiexpo
When attribute is true
--(blank)
Otherwise
--When actor's position is < B
----Constrain position to position + 1
This is probably not a good way to do it , but it might work well in some cases
Guys how to i upload a GS file here
I'm going to show you what i came up with
try this:
http://forums.gamesalad.com/discussion/comment/458449/#Comment_458449