#START
@! alive (leader grp14)
(leader grp14) removeaction ability
@ alive (leader grp14)
_leader = leader grp14
?!(local _leader):exit
ability = _leader addaction ["Engnieer abiliies","eng\abilities.sqs"]
goto "START2"
#START2
~0.5
?(! alive (leader grp14)): goto "REMOVEACTIONS"
goto "START2"
#REMOVEACTIONS
_leader removeaction ability
_leader = leader grp14
?!(local _leader):exit
ability = _leader addaction ["Engnieer abiliies","eng\abilities.sqs"]
goto "START"
There, dunno if I fixed it right
and don't know if you need all the () around leader grp14, but they don't do any harm
1: you can't have "#START" 2 places.
2: to remove a action you gotta use
unitname removeaction action
so not
removeaction ability
but
_leader removeaction ability
3: to add a action you write
actionname = unitname addaction ["Text","script.sqs"]
so not
_leader ability = addaction ["Engnieer abiliies","eng\abilities.sqs"]
but
ability = _leader addaction ["Engnieer abiliies","eng\abilities.sqs"]
Many quotes
Dunno if it's all right, but I hope so
oh, and btw, you could only use this part of the script:
#START
~0.5
?(! alive (leader grp14)): goto "REMOVEACTIONS"
goto "START"
#REMOVEACTIONS
_leader removeaction ability
_leader = leader grp14
?!(local _leader):exit
ability = _leader addaction ["Engnieer abiliies","eng\abilities.sqs"]
goto "START"
but, since the script exits for everyone who is not leader (?!(local _leader):exit), the script won't work when the new leader dies...cause then the script would only run on the leader, and when he dies, the script exits from him too, and it doesn't run anymore...bah, actions in MP sucks :-\