How can I copy only a constant frequency?
by frontakk · in Torque X 2D · 11/30/2009 (1:21 pm) · 5 replies
I want to copy the object only a constant frequency.
But Spawner doesn't have "Frequency" paramerter.
How can I copy only a constant frequency?
The excite translation is used for these sentences.
But Spawner doesn't have "Frequency" paramerter.
How can I copy only a constant frequency?
The excite translation is used for these sentences.
About the author
#2
Sorry, one more Question.
How do you delete spawner object?
11/30/2009 (9:42 pm)
Thanks comment Diego. Sorry, one more Question.
How do you delete spawner object?
#3
yourSpawnerObject.MarkForDelete = true;
What TX will do is to put that object in a pool (if you have marked it to use the pool) or to dispose of it. I recomend you don't use the pool unless you have performance issues regarding memory allocation, because when you use the pool some strange behaviors may arrise, and you will need to dig a lot to understand why.
12/01/2009 (7:21 pm)
I think you can use the standard way to delete any scene object, that is:yourSpawnerObject.MarkForDelete = true;
What TX will do is to put that object in a pool (if you have marked it to use the pool) or to dispose of it. I recomend you don't use the pool unless you have performance issues regarding memory allocation, because when you use the pool some strange behaviors may arrise, and you will need to dig a lot to understand why.
#4
12/01/2009 (8:15 pm)
When you're pooling objects don't forget that when they get recycled they won't be like 'new' objects, as properties/attributes will have values from the object's previous incarnation and these may need resetting. So Diego is right, you have to pay a little more attention to the detail when you're pooling objects.
Torque Owner Diego Santos Leao - GameBlox Studio
You could also use a component's process ticks to do that, as the "ProcessTick" method of a component is called at a constant 30 times per second (by default).