Jump to content
Sign in to follow this  
1para{god-father}

Trigger via script then grouped

Recommended Posts

At the moment in my editor I have a trigger that is grouped to my pilot and in condition i have THIS and act i have ps_pilotnear=true.

I am trying to do this via script to learn, so how can I group this to my Pilot , so it activates when he is withing the Area ? and sets my varible to true ?

_trig = createTrigger ["EmptyDetector", [getmarkerPos Mission1marker select 0,getmarkerPos Mission1marker select 1,0]]; 
_trig setTriggerArea [350, 350, 0, true];
_trig setTriggerActivation ["VEHICLE", "present", true]; // not sure how to link to pilot
_trig setTriggerStatements ["ps_pilotnear=true"];

many thanks

Share this post


Link to post
Share on other sites

Your code will not work because you forgot arguments at settriggerstatements and triggeractivation doesn´t work that way.

Take a look at that:

Triggerattachvehicle

and createTrigger with the subcommands

btw. you would better use a program like ArmaEdit or Squint to write your scripts. It will make your life a lot easier.

Share this post


Link to post
Share on other sites
_pos = getmarkerpos Mission1marker;
waituntil {pilot distance _pos < 350};
ps_pilotnear = true;

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  

×