Behaviours
by praju · in Torque Game Builder · 07/21/2010 (4:43 am) · 2 replies
Hi guys...! How do you loop up behaviours? For example, lets say, i have two behaviours - 1.Facing an object 2. Moving towards an object. Now, how can i make sure that my object faces the other object first before moving towards it??? Thanks in advance!!
About the author
#2
Yes! i am making a top down game!!! i will try this out!!!
07/22/2010 (4:10 am)
Thank you Brenton! That pretty well made sense to me..:P! Yes! i am making a top down game!!! i will try this out!!!
Torque 3D Owner Brenton Dewhurst
Zero Genesis
I'll let you do the code but I'll give you an idea of what I mean. I'm assuming your making a top down game?
warning: I'm extremely tired and may not make sense or I what I said could possibly do nothing. In my current state of mind it sounds fine.
Use an if statement and a bool to make sure the object doesn't move towards the other object before it turns--simple right?. This next part is optional. Track if the other object moves and face it again if it has. Or you could stop movement and then face the object again, but the first way should be better. You don't need to track movement if the object isn't going to move; but I said it anyway if you wanted to do it.