Jump to content
Sign in to follow this  
Sandy*

Trigger syntax?

Recommended Posts

_trg = createTrigger ["EmptyDetector", _pickupSpot];
_trg setTriggerArea [200,200,0,false];
_trg setTriggerActivation ["VEHICLE","PRESENT",false];
_trg setTriggerStatements ["this", "{_x assignAsCargo transport1; [_x] orderGetIn true;} foreach units _blugroup;", ""];
_trg triggerAttachVehicle [transport1];

I'm trying to set up a trigger so that once a vehicle named transport1 arrives at the trigger area, an AI group of infantry (_blugroup) would board it. I'm not exactly sure though what's wrong here, if I run the assignAsCargo/orderGetIn commands outside the trigger they work - the infantry will board the vehicle. I've also tested the trigger by placing a "hint 'test'" command in the activation field and transport1 will trigger it succesfully. But with the above script, nothing happens.

I have a feeling this is some simple syntax error or wrong use of commands so feel free to facepalm at me ;)

Share this post


Link to post
Share on other sites

_blugroup you can't use local variables in a trigger. you'll have to rename it blugroup

Share this post


Link to post
Share on other sites

Of course it had to be something so simple. It works now - my dearest thanks :yay:

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  

×