Jump to content
Sign in to follow this  
Ice_Rhino

Trigger - Kill Everything East in Trigger Area

Recommended Posts

For the purposes of testing;

Is there a way that I can put down a Trigger with a radius that on a radio command will kill everything 'EAST' or setDamage to 1 within the trigger area?

If so, how would I go about this?

Thanks

T

Share this post


Link to post
Share on other sites
with a radius

So do you want all east units in the trigger area to be killed or do you want all east units on the map to be killed?

Also, this is pretty easy to script no matter which way you wanted it, I'm sure you can do it.

Share this post


Link to post
Share on other sites

I think it's all the Opfor units within a trigger area, however the trigger is activated via radio call condition. And I can agree not only is this pretty simplistic, but I'm definitely sure it's information that is already out there.

i.e.

http://forums.bistudio.com/showthread.php?183934-Unit-Present-Radio-Activation&p=2789797&viewfull=1#post2789797

Edited by JShock

Share this post


Link to post
Share on other sites

Here's a hint

{
if ([thisTrigger, _x] call BIS_fnc_inTrigger && {side _x == "EAST"}) then
{
	// ??
};
}forEach nearestObjects [thisTrigger, [], RADIUS_OF_TRIGGER];

Share this post


Link to post
Share on other sites

This was the code I was trying to use but it also killed a BluFor group. I shall look at the other threads suggested.

{if(_x != player && getPos _x distance getMarkerPos "someMarker" < 2000) then {_x setDamage 1;};} forEach allUnits;

Thanks though

Share this post


Link to post
Share on other sites

Here is a direct edit of your code that works

{if([color="#008000"][b][i]side _x == east &&[/i][/b][/color] _x != player && getPos _x distance getMarkerPos "someMarker" < 2000) then {_x setDamage 1;};} forEach allUnits;

Also curious, are you still having problems with ai returning to Waypoint nav after contact? I get the feeling like this is related. Perhaps killing every enemy to see if then the BLU AI immediately returns to there "normal" behaviour.

Edited by Benargee
PS

Share this post


Link to post
Share on other sites

You could also get the trigger's triggerArea and use one of the axis's for distance. That way it's more "dynamic" as you can simply change trigger size to negotiate the desired radius.

With your code:

{if ((_x != player) && {(side _x) == east && {_x distance radTrig <= ((triggerArea radTrig) select 0)}}) then {_x setDamage 1;};} forEach allUnits

OR

Just as condition

this && {(_x != player) && {(side _x) == east && {_x distance radTrig <= ((triggerArea radTrig) select 0)}} count allUnits > 0} 

---------- Post added at 19:06 ---------- Previous post was at 18:46 ----------

But tbh, after looking, Dread's code is the way to go. IMO.

{
   if ([thisTrigger, _x] call BIS_fnc_inTrigger && {side _x == "EAST"}) then
   {
       _x setDamage 1;
   };
}forEach nearestObjects [thisTrigger, [], (triggerArea thisTrigger) select 0];  // determine how far you want nearestObjects to search with one of the trigger's axis's

MY 2C

Edited by Iceman77
Saw Dread's post.

Share this post


Link to post
Share on other sites

Also curious, are you still having problems with ai returning to Waypoint nav after contact? I get the feeling like this is related. Perhaps killing every enemy to see if then the BLU AI immediately returns to there "normal" behaviour.

Yes, this is partly the reason I am trying this, but also for a quick play through of the mission.

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  

×