Home   Help Search Login Register  

Author Topic: Open/Close Gate  (Read 8514 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Open/Close Gate
« Reply #15 on: 16 May 2007, 22:31:41 »
First trigger set to side present and repeatedly Condition:
Code: [Select]
({_x isKindOf "LandVehicle"} count thisList) > 0
Use only one trigger and call your gate closing script from the On Deactivation field.
urp!

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Open/Close Gate
« Reply #16 on: 17 May 2007, 05:52:24 »
Very cool.  I need to learn the object tree to make use of that cool kindof command.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline genji

  • Members
  • *
Re: Open/Close Gate
« Reply #17 on: 17 May 2007, 18:10:45 »
i take my hat off to you Mr.Peanut sir  :)

here's a working solution using your trigger codition that dosnt need a script  :D

make a bar gate named "gate1"

make 2 triggers:

1st trigger
condition:true
onact: gate1 animate ["Bargate", 1];

2nd trigger
rectangle
axis a:30
axis b:5
activation: anyone present repeatedly
condition: ({_x isKindOf "LandVehicle"} count thisList) > 0
on act.: gate1 animate ["Bargate", 0];
on dea.: gate1 animate ["Bargate", 1];

the 1st trigger closes the gate at the start of the mission so its shut to begin with.

the 2nd trigger should be placed as a rectangle with dimensions of about 30 x 5 on the road where the gate is so that any vehicle in the area will open the gate.
« Last Edit: 17 May 2007, 18:14:40 by genji »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Open/Close Gate
« Reply #18 on: 17 May 2007, 19:07:07 »
You can see I am a neophyte at objects too!
Can replace Condition with:
Code: [Select]
( "LandVehicle" countType thisList) > 0
isKindOf is a new ArmA command, but in this case the old OFP command is a little more succinct.
urp!