How to iterate over all player objects ?
by Orion Elenzil · in Torque Game Engine · 03/04/2007 (2:04 pm) · 4 replies
This seems like a silly question,
but does anyone have a good way to iterate over all player objects in the simulation ?
the messaging system iterates over the ClientGroup,
which is pretty good, except i want to include NPCs, which aren't in there.
tia,
orion
but does anyone have a good way to iterate over all player objects in the simulation ?
the messaging system iterates over the ClientGroup,
which is pretty good, except i want to include NPCs, which aren't in there.
tia,
orion
About the author
#2
It's just an occasional iteration.
I'm actually doing the former, it's just a little ugle to remember that i've got player objects in 3 different SimGroups.
thanks!
03/04/2007 (2:36 pm)
Thanks for getting back Stephen.It's just an occasional iteration.
I'm actually doing the former, it's just a little ugle to remember that i've got player objects in 3 different SimGroups.
thanks!
#3
03/04/2007 (2:39 pm)
Well in this particular case, no reason at all to use a SimGroup--I'd just use a SimSet.
#4
03/04/2007 (2:46 pm)
Ohh, i getcha. yeah.. thanks!
Torque 3D Owner Stephen Zepp
Alternatively, if it's a constant poll of the objects per tick, just do whatever would be the response per object to the iteration it directly in ::processTick().