Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
RonnieJ

Create end trigger not working

Recommended Posts

hey guys... I cant seem to get this working... tried with:

_trg = createTrigger["end1",getPos player];

_trg setTriggerArea[0,0,0,false];

_trg setTriggerStatements["this","!alive maintarget", ""];

_trg setTriggerType "END1";

But it wont work...:confused:

Share this post


Link to post
Share on other sites

Might want to recheck this one:

_trg setTriggerStatements["this","!alive maintarget", ""];

Share this post


Link to post
Share on other sites

ye im not completly sure of the syntax but thats how far ive gotten with it :) The target does exist..

_Radar = createVehicle ["RU_WarfareBAntiAirRadar", [_x,_y,1], [], 0, "NONE"];

_Radar addEventHandler ["HandleDamage",{(_this select 4) == "PipeBomb"}];

_Radar setVehicleVarName "maintarget";

hint format["Unit's name: %1",_Radar];

returns the name "maintarget"

Share this post


Link to post
Share on other sites

Syntax is: trigger setTriggerStatements [condition, activation, deactivation]

If Im allowed to guess, condition would be the "!alive maintarget" rather than "this".

Share this post


Link to post
Share on other sites

Hmm might be me who's a bit confused then... I thought activation was what it took for the tigger to go off...

Ill try it when I get home...

Share this post


Link to post
Share on other sites

condition = what activates the trigger

activation = what is done once it fires

deactivation = what is done once the condition is false again

Share this post


Link to post
Share on other sites

Still cant get it to end the missions... I have tried with:

_trg = createTrigger["end1",getPos player];

_trg setTriggerArea[0,0,0,false];

_trg setTriggerStatements["this","", "!alive maintarget"];

_trg setTriggerType "END1";

and

_trg = createTrigger["end1",getPos player];

_trg setTriggerArea[0,0,0,false];

_trg setTriggerStatements["this","", "!alive _Radar"];

_trg setTriggerType "END1";

and

_trg = createTrigger["end1",getPos player];

_trg setTriggerArea[0,0,0,false];

_trg setTriggerStatements["!alive _Radar","", ""];

_trg setTriggerType "END1";

and

_trg = createTrigger["end1",getPos player];

_trg setTriggerArea[0,0,0,false];

_trg setTriggerStatements["!alive maintarget","", ""];

_trg setTriggerType "END1";

Edited by RonnieJ

Share this post


Link to post
Share on other sites

Hi RonnieJ,

try this:

Radar = createVehicle ["RU_WarfareBAntiAirRadar", getPos player, [], 0, "NONE"];
Radar addEventHandler ["HandleDamage",{(_this select 4) == "PipeBomb"}];
Radar setVehicleVarName "maintarget";
hint format["Unit's name: %1",Radar];


_trg = createTrigger["EmptyDetector",getPos player];
_trg setTriggerArea[0,0,0,false];
_trg setTriggerStatements["!alive Radar","", ""];
_trg setTriggerType "END1";

If you use the local variable _Radar the trigger don't see it and so it don't activate itself. So, change the local variable _Radar to global variable Radar let do it work.

Another change it's the type of the trigger in the command "createTrigger": use "EmptyDetector" instead "end1" because end1 is not correct.

Hope this can help you

P.S. It work for me, I've tested this little piece of code myself ;)

Edited by goliath86

Share this post


Link to post
Share on other sites

Great it works... fail'd at first but didnt see you changed the position where it is placed :) Thx m8! Great work!

Edited by RonnieJ

Share this post


Link to post
Share on other sites
Great it works... fail'd at first but didnt see you changed the possition where it is places :) Thx m8! Great work!

oh, sorry mate. I haven't seen the mistake.. :rolleyes:

Edit now! :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

×