Game Development Community

Loop

by RajeshKumarr · in General Discussion · 05/06/2009 (10:09 pm) · 2 replies

Hi to all
Which function in ForgeDemo source code(TorqueScript) called repeatedly (like while loop in win32).
Thanks in advance



---Rajesh---

#1
05/06/2009 (11:36 pm)
There isn't one - TorqueScript is not source code, it is script. The actual looping functions that are called every tick are all in the actual C++ engine code, not TS. Most functions defined in TorqueScript are event-driven: they are called when a certain event happens like a collision or an object being created.

Or, if that's not the question - you can use while, for and (I think) do-while syntax in TorqueScript, but just for tasks you need to iterate over. If you want a function to be called repeatedly, search for 'schedule'.
#2
05/07/2009 (5:45 am)
Thanks Daniel
Actually i tried to parent a object with camera position so if
camera moves means object have to move with camera.How can I achieve this.Please guide me Thanks in advance.


---Rajesh---