You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Help and Guidance  \  Scripting for more than one object

Back to Threads

Viewing Thread: Scripting for more than one object

 

Canuck

Joined: 31 August 2007
Posts: 419
18 March 2008 20:35 (UK time)

Is is possible to run a single script command on more than one object at once, like if I wanted to hide a whole group of objects at the same time, or bind a bunch of objects to the same waypoint at the same time? Something like...

SC_SetObjectHidden(0-5,1);

...maybe?

You need to login to create posts in this thread.

ParaSait

Joined: 26 June 2007
Posts: 1478
18 March 2008 20:48 (UK time)

int i;

for(i = [ID of first object] ; i <= [ID of last object] ; ++i)
{
//Your code here
}

Make sure 'int i;' is located in the same function of your for loop. Then just replace every ID number in your code by 'i'.


This link is dead. It's only still here because, err... yknow, it's some sort of... memorial.


Edited: 18 March 2008 20:55


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use