Jump to content
Sign in to follow this  
Rawr

check if a certain unit activates a trigger

Recommended Posts

So basically, what I want to do is when a trigger gets activated, it will run a script that checks if the trigger got activated by a certain unit.

Tried to solve it myself wink_o.gif ..so what I've got is:

A trigger:

activation: anyone

on activation: [this] exec "check.sqf"

check.sqf:

<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;

if(_unit == man1) then {goto "something"} else {hint "fu!", exit}

Took a wild guess there with the script :P ... and that doesn't work at all.

But what I want to do is; when the unit named "man1" activates the trigger, something gonna happen.

So the question is: how do I make the script so it checks if _unit is man1??

Thanks in advance!

Share this post


Link to post
Share on other sites

Try this:

Trigger:

activation: anyone

on activation: thislist exec "check.sqf"

check.sqf:

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

if (man1 in _units) then {goto "something"} else {hint "fu!", exit}

Share this post


Link to post
Share on other sites

Thanks mate! It works! Really appreciate your help and the quick reply smile_o.gif

Share this post


Link to post
Share on other sites
Thanks mate! It works! Really appreciate your help and the quick reply smile_o.gif

No problem. I'm a script-obsessed forum loiterer.

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  

×