nutter
, thx for the brilliant reply once more.
only thing is, i'm a little confused by the first part of the explanation.
i'm not sure where this should go:
So an example of an action-based script goes like this:
_obj = _this select 0
_man = _this select 1
_index = _this select 2
If you want to remove the action from the object immediately after it's triggered, use this line along with the above:
_obj removeAction _index
or this:
ScudOperator = _this select 1; publicVariable "ScudOperator"
i'll explain. i have set up a system where when any west player gets in the scud, it triggers the action adding sequence, which goes like this:
i have a trigger set up set to condition:
{(side _x) == west} count crew scud1 > 0
with this is the onactivation field:
disarmmissile1action = scud1 addAction ["Disable detonation", "disarmmissile1sequencestart.sqs"];
the disarmmissile1sequencestart.sqs goes like this:
startdisarmmissile1script = TRUE
publicVariable "startdisarmmissile1script"
i have a trigger set up with the condition:
startdisarmmissile1script
and in the onactivation field reads:
[] exec "disarmmissile1.sqs"
which in turn leads to the following script:
scud1 removeAction disarmmissile1action
scud1 say "disarm"
~6
scud1disarmed = true
hint "Missile detonation system disarmed."
scud1notdisarmed = false
exit
in addition to this, i also have another set of triggers and scripts which go one step further and 'reprogram the missile co-ordinates'. (pretty much exactly the same as the previous set of stuff).
then i have the following triggers set up should someone launch the scud without doing BOTH procedures:
trigger 1 conditions:
scud1launched && scud1notdisarmed
on activation:
[] exec "livemissilelaunch.sqs"
that script goes like this:
scud1 removeAction disarmmissile1action
scud1 removeAction reprogrammissile1action
scud2 removeAction disarmmissile2action
scud2 removeAction reprogrammissile2action
~1
hint "Some muppet launched a live missile."
end4 = true
exit
trigger 2 conditions are:
scud1disarmed && scud1launched && scud1notreprogramed
and this activates:
[] exec "missileheadedforwrongtarget.sqs";
and that script runs like this:
scud1 removeAction disarmmissile1action
scud1 removeAction reprogrammissile1action
scud2 removeAction disarmmissile2action
scud2 removeAction reprogrammissile2action
~1
hint "Some muppet launched a nuclear missile at a major target in the USA."
end4 = true
exit
both lead to a condition which ends the mission. to make things even more complicated, i have a second missile with the same set of triggers and conditions, so the whole thing exists twice.
i understand the trigger and init tasks, but i'm not sure where to put the action script stuff. any help, much appreciated. cheers buster.