Game Development Community

How to use tick inside model (cs) definitions?

by Nic Biondi · in Torque Game Engine · 01/28/2004 (11:55 pm) · 8 replies

Situation:
I have a moddel that I want to follow my mouse around in order to function as a "dummy block" to illustrate where to place an object before actually placing it,(like in battlezone or any other rts)

Problem:[\b]
I have no problem making the models or .cs files to incoorperate dynamic structures but I need the dummy block to "follow" my mouse. I am toying around with the notion of using process tick functions,or a similar static image friendly class, to make the object itself, position properly using a raycast(which I have already written and tested)

[b]QUESTION:

What script function would I use for this? I seem to remember some ::processTick function used similarly to ::onADD.

#1
01/29/2004 (9:25 am)
This sounds like behavior you will need to add at the C++ level. You would probably use processTick to do it. (Maybe interpolateTick if you needed faster response.)
#2
01/29/2004 (11:42 am)
Ok, I have no worries about programming in C++, Its just that I thought that I remembered seeing some code where there was some ~ gameData::processTick() type code that at the datablock scripting level?
#3
01/29/2004 (5:54 pm)
The only ticks by default in the scripting side I could think of have to do with trigger objects. Though you might be thinking of a bit from the engine overview discussing GameBase::processTick() and related commands.
#4
01/29/2004 (6:15 pm)
Yeah, I bet thats where I remember it. Is there a place in the engine code where I should put my processTick() function? I need it to update the position of a static object. Or do I need to write my own class?
#5
01/29/2004 (6:40 pm)
Your own class would be the best route. Subclass ShapeBase, maybe.
#6
02/03/2004 (8:21 pm)
Would he export an event of type tick, or - and I don't know how to do this part - but use the c++ code to execute script?

I know with server, I've seen HeartBeat type stuff. Could a heart beat be set with a low interval, and then how does one tap into the beats?
#7
02/03/2004 (9:22 pm)
Check out processTick().
#8
02/04/2004 (1:18 am)
Yeah ben, this is a semi-old post. I think that we (you included) decided that I needed to code this in c++ and make a class like tsStatic. Im in the process of doing this now. Thanx for all the help though.