Jump to content
Denis154965

Object in area trigger

Recommended Posts

Hi, i`ve got a script that spawns a crate and i want that when the crate enters area (village etc.) it exec a script.
I need it to be repeatable.

I found some scripts like 

//trigger conn
[box in thisList];;

//on active 
[] execVM "myscript.sqf";

but i cant have multiple boxes called "box".

Share this post


Link to post
Share on other sites

Name your boxes box, box_1, box_2, ... and then put one of the following in trigger condition:

 

box in thisList && box_1 in thisList && box_2 in thisList

if you want your script to fire if all 3 boxes are in the trigger.

 

box in thisList || box_1 in thisList || box_2 in thisList

if you want your script to fire if one of your boxes is in the trigger.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

@stanhope 

box="box";
balance = missionNamespace getVariable "USD";

if (balance < 200) then {
    ["Not enough money!"] remoteExec["systemChat"];
}   
	else {
	box = "Land_PaperBox_01_small_closed_white_IDAP_F" createVehicle getMarkerPos "marker_39",
	missionNamespace setVariable["USD", USD-200],["IDAP supplies -200$"] remoteExec["systemChat"];
}; 

is there any way to make it so i dont have to make a spawn trigger for every box(tag)?

  • Like 1

Share this post


Link to post
Share on other sites

There's plenty of other ways doing this, but without knowing the use case I can't suggest any. 

  • Like 1

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

×