After understanding the the basic script above.
New designers can then modify the script further with the "random" instruction.
VARIABLES
Basically, you should choose a variable number to do a set group of tasks.
Then re-use it when needed throughout your maps.
IMO it's a way to be a bit more familiar with what's going on and stay mentally organized.
For this example I have chosen variable 10 but you can easily choose your own.
Variable 10 default state is (v10,0)
We are saying that when "eq(v10,0)" reaches "eq(v10,1)" then the set actions are triggered
The trigger is seen in "if ssndead set(v10,1)"
The actions are seen in "if eq(v10,1)"
//EXAMPLE WAC
//teleport fx to targets
//using...
//effect_FxFire1m
//effect_FxFire2m
//effect_FxFire4m
//effect_FxFire6m
//effect_FxFireHm
//effect_fxfirewd
//variable 10 object(s) destroyed
if ssndead(1) and never() then
set(v10,1)//when ssn 1 is destroyed this sets variable 10,0 to 10,1
endif
//variable 10 start random
if eq(v10,1) and never() then
fx2tgt effect_fxfire6m(1)// (1)= teleport target 1 and starts with script
endif
if chain(1) and random(3) and never() then
fx2tgt effect_fxfire6m(2)// (2)= teleport target 2 and fires approx 1-3 seconds after triggering
endif
if chain(2) and random(3) and never() then
fx2tgt effect_fxfire6m(3)// (3)= teleport target 3
endif
NOTE:
In case of a bug (I call them Gremlins) and a variable fails to trigger no matter what.
Trying a different variable number and/or triggering it in a different way sometimes works wonders.
Last edited by Guest001; 08-24-2013 at 11:20 AM.
Reason: update info
|