Home   Help Search Login Register  

Author Topic: custom mines disable-able  (Read 1230 times)

0 Members and 3 Guests are viewing this topic.

Offline pertplus

  • Members
  • *
custom mines disable-able
« on: 14 Nov 2007, 20:02:42 »
hey!
I'll get right to it: I'm makig a map with a convoy you must protect, but there are mines at certain points in its path. The convoy is only hummers and jeep w/ machineguns. I need to make the mines go off when they pass over. After searching these forums, I discovered it is possible with making triggers that set off an explosion and setdamage. But, there are a couple problems with this. First, this makes the mines go off when people run over them too. Second, it makes it no longer possible to disable the mines.

My question is, is there a way to make the game treat the vehicles in the convoy as if they are armor? I ask because this would be the easiest way to solve the problem, as I don't really know how to set it up so there is an action added to the player that will disable the mine AND make the trigger go away. I would much rather find some way to 'treat' certain units as armor, if possible!!

many thanks, and hello.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: custom mines disable-able
« Reply #1 on: 14 Nov 2007, 20:13:32 »
You can still use the trigger method, but you need to change the trigger condition from the default (this - meaning any men or vehicles, including aircraft, in the area). You want to limit triggering to only when there is a land vehicle in the zone (though this makes them AT mines, it doesn't deal with the disarming issue):
Code: (trigger condition) [Select]
("LandVehicle" countType thisList) > 0

(EDIT: I used an ArmA command in the first version, but fixed now - duh!)
« Last Edit: 14 Nov 2007, 20:22:11 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline pertplus

  • Members
  • *
Re: custom mines disable-able
« Reply #2 on: 14 Nov 2007, 20:53:57 »
thanks for reply, so landvehicle includes ONLY vehicles and not aircraft or men, right??
Also, what does " countType thisList > 0 " do ?
And if anyone could help me tackle the disarming issue that would be great...hopefully without having to script a new action!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: custom mines disable-able
« Reply #3 on: 14 Nov 2007, 21:04:32 »
Well, try looking up countType in the COMREF and looking at the inheritance hierarchy of objects in OFP to answer your questions. thisList, when referred to within a trigger's code, is the same as using list on the trigger.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline pertplus

  • Members
  • *
Re: custom mines disable-able
« Reply #4 on: 14 Nov 2007, 21:16:05 »
ah I see now... at least partially.

If anyone could help me tackle the disarming issue that would be great! (hopefully without having to script a new action)!!!