Loop through all objects ?
by Kevin Johnson · in Torque Game Engine · 06/22/2004 (12:56 pm) · 2 replies
This should prolly go in the scripting forum but here goes.
is there a quick way to loop through all the objects/players on the dedicated server, to do a gettransform to get where everyone is?
is there a quick way to loop through all the objects/players on the dedicated server, to do a gettransform to get where everyone is?
Torque Owner Brett Fattori
%gID = MissionGroup.getId(); // If group exists if (%gID != -1) { %gCount = MissionGroup.getCount(); for (%idx = 0; %idx < %gCount; %idx++) { %obj = %gID.getObject(%idx); // Determine if it's a player // Get it's position %obj.getPosition(); } }Or something like that...
- Brett