Cloneindex

From Game Editor

Revision as of 10:55, 6 July 2009 by Skydereign (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

cloneindex is an actor variable that is used to differentiate clones. In scripts, cloneindex can be used in a switch, allowing for individualized clone action.

switch(cloneindex)
{
    case 0: // first clone
    r=255;
    b=0;
    g=0;
    break;
    case 1; // second clone
    r=0;
    b=255;
    g=0;
    break;
    case 2: // third clone
    r=0;
    b=0;
    g=255;
    break;
}