Bloodbane
Well-known member
If you don't understand about branching, you can read this tutorial:
http://www.chronocrash.com/forum/index.php?topic=20.0
Now about script itself, here's a script example:
Red text above is set to 1 which means the 'jump' will immediately be run when this empty entity is spawned.
If it's set to 0, the 'jump' effect will only occur when current level ends
Although the script is 'attached' to empty entity, it's not related to that entity at all so the script can be moved to other entity spawn in same level
http://www.chronocrash.com/forum/index.php?topic=20.0
Now about script itself, here's a script example:
This script will check the name of character player 1 is using. If his name is Ninja, the script will jump to branch Path1, if name is Fighter, script will jump to Path2spawn empty
@script
void main()
{
void P1 = getplayerproperty(0, "entity");
if(P1){
void Model = getentityproperty(P1, "name");
if(Model == "Ninja"){
jumptobranch("Path1",1);
} else if(Model == "Fighter"){
jumptobranch("Path2",1);
}
}
}
@end_script
coords 160 190
at 0
Red text above is set to 1 which means the 'jump' will immediately be run when this empty entity is spawned.
If it's set to 0, the 'jump' effect will only occur when current level ends
Although the script is 'attached' to empty entity, it's not related to that entity at all so the script can be moved to other entity spawn in same level