Jump to content
Sign in to follow this  
M.Evans

Addaction after respawn (specific)

Recommended Posts

Alright I know there are threads out there pertaining to this already and I have read them all. The thing with mine is I am executing a script that looks like this.

Unit Init: (for unit a1 *there is another 25 units with this same init)

this addaction ["Use Cricket","click.sqf"]; this addEventHandler ["killed", {_this execVM "addActionAgain.sqf"}];

AddActionAgain.sqf

a1 = _this select 0;
waitUntil {alive a1};
a1 addaction ["Use Cricket","click.sqf"];

a2 = _this select 0;
waitUntil {alive a2};
a2 addaction ["Use Cricket","click.sqf"];

a3 = _this select 0;
waitUntil {alive a3};
a3 addaction ["Use Cricket","click.sqf"];

a4 = _this select 0;
waitUntil {alive a4};
a4 addaction ["Use Cricket","click.sqf"];

a5 = _this select 0;
waitUntil {alive a5};
a5 addaction ["Use Cricket","click.sqf"];

a6 = _this select 0;
waitUntil {alive a6};
a6 addaction ["Use Cricket","click.sqf"];

a7 = _this select 0;
waitUntil {alive a7};
a7 addaction ["Use Cricket","click.sqf"];

a8 = _this select 0;
waitUntil {alive a8};
a8 addaction ["Use Cricket","click.sqf"];

a9 = _this select 0;
waitUntil {alive a9};
a9 addaction ["Use Cricket","click.sqf"];

a10 = _this select 0;
waitUntil {alive a10};
a10 addaction ["Use Cricket","click.sqf"];

a11 = _this select 0;
waitUntil {alive a11};
a11 addaction ["Use Cricket","click.sqf"];

a12 = _this select 0;
waitUntil {alive a12};
a12 addaction ["Use Cricket","click.sqf"];

a13 = _this select 0;
waitUntil {alive a13};
a13 addaction ["Use Cricket","click.sqf"];

a14 = _this select 0;
waitUntil {alive a14};
a14 addaction ["Use Cricket","click.sqf"];

a15 = _this select 0;
waitUntil {alive a15};
a15 addaction ["Use Cricket","click.sqf"];

a16 = _this select 0;
waitUntil {alive a16};
a16 addaction ["Use Cricket","click.sqf"];

a17 = _this select 0;
waitUntil {alive a17};
a17 addaction ["Use Cricket","click.sqf"];

a18 = _this select 0;
waitUntil {alive a18};
a18 addaction ["Use Cricket","click.sqf"];

a19 = _this select 0;
waitUntil {alive a19};
a19 addaction ["Use Cricket","click.sqf"];

a20 = _this select 0;
waitUntil {alive a20};
a20 addaction ["Use Cricket","click.sqf"];

a21 = _this select 0;
waitUntil {alive a21};
a21 addaction ["Use Cricket","click.sqf"];

a22 = _this select 0;
waitUntil {alive a22};
a22 addaction ["Use Cricket","click.sqf"];

a23 = _this select 0;
waitUntil {alive a23};
a23 addaction ["Use Cricket","click.sqf"];

a24 = _this select 0;
waitUntil {alive a24};
a24 addaction ["Use Cricket","click.sqf"];

a25 = _this select 0;
waitUntil {alive a25};
a25 addaction ["Use Cricket","click.sqf"];

a26 = _this select 0;
waitUntil {alive a26};
a26 addaction ["Use Cricket","click.sqf"];

With that I have found that the respawn addaction does not work. My question is would this work if it was 26 different scripts or how would I use this addaction after respawn. Everything I have tried does not work, or has not given me any results. I tried to follow the exact template of each script I found, but the thing is there is 26 people which have to have this addaction after they individually die. I am not sure what the best way to do that would be.

Share this post


Link to post
Share on other sites
_player = _this select 0;
waitUntil {alive _player};
_player addaction ["Use Cricket","click.sqf"];

Share this post


Link to post
Share on other sites

also, why not use "respawn EH" ? depending on your respawn time, triggering that script from a killed handler could take a while before running.

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  

×