OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: cosjacket on 12 Aug 2009, 18:29:55
-
hi yer..could you tell me how to make a ied and how to set if off when someone approaches..thanksxx
-
Just place an object, or unit on the map and call it name it pos1
just place this in a triggers On Act box bomb = "GrenadeBase" createVehicle [(getPos pos1 select 0),( getPos pos1 select 1),0.5]
set your trigger up to anybody present and place it over the object or unit.
If you want you can attach a trigger to a unit.
You name a trigger trig1 then in the init box of a unit named pos1
trig1 attachto [pos1,[0,0,0]]
now if the unit moves around the map the trigger moves with it.
You will need to set the trigger to the opposite side or it will go off immediately.
-
If you want you can attach a trigger to a unit.
Is it possible to do this with the attachTo command, or do I have to make a continuous loop of setPos commands?
-
The attachto command will attachto most units, objects and triggers together. Small objects and markers don't seem to work and will need setpos.