Jump to content
Sign in to follow this  
mrbean1112

Trigger creation via script help

Recommended Posts

Hello. okay my problem is that i am trying to create a trigger via the script "agree.sqs"

Now in the script, i have no idea how to create this trigger to make it radio alpha.. I have been able to make it a trigger when west,present.. but i have not been able to figure out how to get anything else, and even then i was having problems.

So i come to you.

If possible.. i'd Really appreciate if anyone can help me out here with a script that adds a trigger that does the following

Radio Alpha

on activation : [] exec "agree1.sqs"

and i need it to not repeat.

Also, would it be possible to rename the radio command to something like Agree with extraction, or something?

Btw.. this site may provide some assistance.. i did not quite understand what to do.

http://community.bistudio.com/wiki/createTrigger

*edit

Btw. Would anyone know how to check if a unit is in the vicinity of a trigger AND not in vehicle? then kill them if they are not in?

I've tried THIS AND !vehicle this

but that does not work.

>.<

Share this post


Link to post
Share on other sites

example:

radio setTriggerActivation ["ALPHA", "present", false];

radio setTriggerStatements ["this", "[] exec agree1.sqs", ""];

radio setTriggerText "Agree with extraction";

where "radio" is the name of the trigger.

as for the check for vehicle, im quite new so i couldnt help. but to clarify is it the player you want to check or a specific unit, like a computer controlled unit?

Share this post


Link to post
Share on other sites

Thank you so much, and for the 2nd question.. it is a player in multiplayer. it's kinda like a spot that i don't want people to go into unless they get into a chopper.. i have a specific name for the chopper too.. chopper2.

Share this post


Link to post
Share on other sites
Thank you so much, and for the 2nd question.. it is a player in multiplayer. it's kinda like a spot that i don't want people to go into unless they get into a chopper.. i have a specific name for the chopper too.. chopper2.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit not in (vehicle chopper2)

me thinks.

I dunno about the other to kill them if they aren't.

I'm currently not near my ArmA editor so I can not check either.

try a trigger which sets of when the "safe spot"-trigger you mentioned earlier are triggered.

say that you have an array with the players/units you want to check

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

{

if(_x NOT in list mysafeTrigger)then{

_x setDammage 1;

};

}forEach myUnits

Share this post


Link to post
Share on other sites

I was also trying to create a trigger in the init.sqs so the trigger is present the whole time.

But something didn't work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">trg setTriggerActivation ["NONE","PRESENT",true];

trg setTriggerArea [0,0,0,false];

trg setTriggerStatements ["KEY_VoiceIdlePlayer","[KEY_VoiceGroupPlayer,KEY_VoiceNumberPlayer] exec ai\ai_voice\ai_voice1\ai_voice7.sqs",""];

trg setTriggerType "SWITCH"

Share this post


Link to post
Share on other sites
I was also trying to create a trigger in the init.sqs so the trigger is present the whole time.

But something didn't work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">trg setTriggerActivation ["NONE","PRESENT",true];

trg setTriggerArea [0,0,0,false];

trg setTriggerStatements ["KEY_VoiceIdlePlayer","[KEY_VoiceGroupPlayer,KEY_VoiceNumberPlayer] exec ai\ai_voice\ai_voice1\ai_voice7.sqs",""];

trg setTriggerType "SWITCH"

Ur missing the createTrigger part?

trg=createTrigger["EmptyDetector",[x,y,z]];

"[x,y,z]" = position array

Also this is corrected:

trg setTriggerStatements ["KEY_VoiceIdlePlayer","[KEY_VoiceGroupPlayer,KEY_VoiceNumberPlayer] exec 'ai\ai_voice\ai_voice1\ai_voice7.sqs' ",""];

Share this post


Link to post
Share on other sites

AWESOME it works. biggrin_o.gif

Thank you very much sickboy thumbs-up.gif

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  

×