Jump to content
Sign in to follow this  
Somerville

Adding Actions to Respawned Unit

Recommended Posts

Hi,

I've got 20ish units, each named, that has actions that can be access by any WEST unit. Here's the script that adds the actions initially:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0

?!(side player == west) : exit

_unit addaction ["Arrest Civilian","arrest.sqs"]

_unit addAction ["Check License", "clicense.sqs"]

exit

Now, there's a trigger for each unit detecting if the unit has died, with !alive **UNITNAME** as the condition. It executes the following script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0

?!(player == _unit) : exit

@(alive _unit)

~1

[] exec "arrestactions.sqs"

exit

However, it's not 'readding' the scripts as I would expect it to. Can anyone tell me where we're going wrong with this?

Share this post


Link to post
Share on other sites

G'day I had this problem too, Check out this post it may be what you need

Odin

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×