OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: NightJay0044 on 13 Feb 2010, 23:06:00
-
Hi, I want to be able to blow up a bridge using the AI. I'm a beginner at this, how do I accomplish this?
Thanks..
-
This worked in OFP not sure about Arma 2 (I haven't seen a bridge yet in this game)...
If you want an AI unit that is not part of the player group to plant a charge at a particular spot using waypoints:
Give the AI player a waypoint where you want the bomb planted. In the on activation field put:
this fire ["put", "pipebomb"]
Give the AI player another waypoint far enough away from the blast zone. In the on activation field put:
this action ["touchoff"]
And if the resulting explosion is not sufficient, you can help it along by:
(object 167794) setDammage 4
The object ID being of course the part of the bridge you want to blast into outter space.
Again all this works in OFP 1.96, not sure about Arma 2...
-
When I used this
(object 167794) setDammage 4
After trigger hit OK.
This is what the error gives me, it says "missing ("
-
That's because object is not a valid command in A1/A2. You'll need to do something like:
((getPos player) nearestObject 167794) setDammage 1But, just to note, nearestObject only finds objects within 50 metres of the position specified; so if you want the waypoint to be further away, you'll have to set the position to a marker or gamelogic (for example), closer to the bridge.
-
Thanks, it worked i just used a gamelogic to replace the player.
-
Sorry people, I know this is solveed but... Where in the Chernarus map is a bridge? I've been searching and haven't seen any serious bridge...
-
Here's a demo (http://www.kylania.com/arma2/BridgeDemo.zip) I did a while back.
-
Thnx man!!!