Home   Help Search Login Register  

Author Topic: Attacking only under a set altitude  (Read 1300 times)

0 Members and 1 Guest are viewing this topic.

Offline Bankler

  • Members
  • *
Attacking only under a set altitude
« on: 09 Mar 2009, 17:57:57 »
I  want a couple of Shilkas (aa1, aa2 and aa3) to stand by in an enemy city. The player (helo1) should be allowed to fly over the city and the Shilkas should not fire at the helicopter. However, IF the player is flying lower than 200 meters and within the city limit radius, the Shilkas should attack and shoot him down.

How is this easiest accomplished?

Walter_E_Kurtz

  • Guest
Re: Attacking only under a set altitude
« Reply #1 on: 10 Mar 2009, 01:26:03 »
1. Set the shilkas to never fire using setCombatMode
In the init line of each shilka write:
Code: [Select]
this setCombatMode "BLUE"2. Create a trigger encompassing the city, connected to the player or the player's helicopter (once the trigger is created, press F2 and drag a line from the player / chopper to the trigger)

3. Configure the trigger
"Vehicle" "Present" "Once", and enter in the condition line:
Code: [Select]
this && ((getPos helo1 select 2) < 200)then, in the activation line:
Code: [Select]
aa1 setCombatMode "RED"; aa2 setCombatMode "RED"; aa3 setCombatMode "RED"

Offline Bankler

  • Members
  • *
Re: Attacking only under a set altitude
« Reply #2 on: 10 Mar 2009, 03:15:16 »
Thank you very much Walter!

Offline Ext3rmin4tor

  • Members
  • *
Re: Attacking only under a set altitude
« Reply #3 on: 13 Mar 2009, 10:49:53 »
Did the unit synchronization works with triggers in OFP 1.96 too? I thought that was an ArmA feature
How can you shoot women and children?
Easy! Ya' just don't lead'em so much! Ain't war hell?!!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Attacking only under a set altitude
« Reply #4 on: 13 Mar 2009, 15:01:54 »
Quote
Did the unit synchronization works with triggers in OFP 1.96 too?
IIRC it worked since the day one..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Attacking only under a set altitude
« Reply #5 on: 14 Mar 2009, 19:55:01 »
In the on activation field you can save some typing by using:
Code: [Select]
{_x setCombatMode "red"} forEach [aa1, aa2, aa3]