Page 1 of 1

variable clone IDs with Script Events

PostPosted: Sat Jan 06, 2007 8:30 pm
by Kodo
How do I use SendActivationEvent with a variable clone ID?

Code: Select all
SendActivationEvent("block_red.1");

The code above works fine for a single specific clone, but I want to be able to increment the Clone ID at will, something like...

Code: Select all
CloneToTrigger++;
SendActivationEvent("block_red.CloneToTrigger");

...Obviously this doesn’t work, but what should the correct syntax be, or does this need to be done a completely different way?

Cheers in advance

PostPosted: Sat Jan 06, 2007 9:23 pm
by makslane
Use the getclone2 function:
http://game-editor.com/forum/viewtopic. ... =getclone2

And make:
Code: Select all
SendActivationEvent(getclone2("block_red", CloneToTrigger)->clonename);

PostPosted: Sat Jan 06, 2007 9:48 pm
by Kodo
Thanks, thats been a great help :)