Giving items/objects behaviors (newbie question)
by Paul Sisneros · in Torque Game Engine · 02/04/2007 (9:08 am) · 2 replies
So, i understand how to create things and give them their prescripted behaviors like rotating, But how do i make something follow a new behavior? I cant just put a loop in a data block obviously. So if i want to make a function (or something like it if theres another thing i should use for this) and have all instances of a item/object follow it without messing with eachother varaibles how is that done? I figure it must be fairly routine since all games need to do it, but i cant figure out how. Im thinking i need to call some function when its created and have that function call itself, but Im not sure how to handle the variables so that multiple instances could use it.
lets say i make an item and for example purposes it does something simple like sliding around and changing its direction randomly every few seconds, and i want to be able to make as many of these as I like. How do I do it?
lets say i make an item and for example purposes it does something simple like sliding around and changing its direction randomly every few seconds, and i want to be able to make as many of these as I like. How do I do it?
Torque Owner James W.
I'm on chapter18. and have no previous programming experince
I did a game with FPSC and a another example was using a waypoint with a floating platform was a define path for it to travel. (not sure if this will help)