Jump to content
Sign in to follow this  
ArmaFiend

Trigger help needed for view distance+

Recommended Posts

_smoke = createTrigger ["None",{getPos Oil_Rig}];

 _smoke setTriggerArea [400,400,0,true];

 _smoke setTriggerActivation ["NONE","PRESENT",false]; 

 _smoke setTriggerStatements ["this","setViewDistance 500;","setViewDistance 4000;"];

 hint "donetest";

 

From everything I know, this should work.  I just want to change view distance on players when they get to oilrig.  I have gotten this to work from the 2d Editor with a fog trigger also for some lightweight ambient smoke but scripting doesn't seem to work.  I am adding this to a script which starts fire and smoke pillar and I would like it to spawn triggers for the "fog 1" and view distance.

 

I have tried many iterations without success and creating trigger by script is something I want to get down.

Share this post


Link to post
Share on other sites

This is not easy to help because scripted trigger can be created only server side or client side by execute that script.

Each ways required different scripted conditions and activation code.

 

Although you can just set detection for side instead of "NONE" if the players are only one sided or "anybody" if not..

 

If you set the detection

 

then you can use thislist from that trigger, thislist contains every unit in  trigger .

 

Other ways you can use  _x distance thisTrigger or even BIS_fnc_Intrigger

 

Please deliver  more details  for exact solution.

Share this post


Link to post
Share on other sites

No luck on first attempt but this finally worked

 

 

_smoke = createTrigger ["EmptyDetector",getPos Oil_Rig,false];
 _smoke setTriggerArea [400,400,0,true];
 _smoke setTriggerActivation ["WEST","PRESENT",true]; 
 _smoke setTriggerStatements ["this","setViewDistance 500;","setViewDistance 4000;"];
 hint "donetest";
 
Thanks-for the help all. Any thoughts on changes over time with view distance? I would like to come back to that at some point. I am just trying to avoid more feature crep with my mission at this point but I would like to revisit that, with or without suggestions.

Share this post


Link to post
Share on other sites

You might want to add 

_smoke triggerAttachVehicle [player];

so it activates only for the player

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  

×