OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: NightJay0044 on 13 Feb 2010, 23:06:00

Title: Blowing up a bridge
Post 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..
Title: Re: Blowing up a bridge
Post by: RangerX3X on 13 Feb 2010, 23:14:58
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...
Title: Re: Blowing up a bridge
Post by: NightJay0044 on 13 Feb 2010, 23:27:43
When I used this

Quote
(object 167794) setDammage 4

After trigger hit OK.

This is what the error gives me, it says "
Quote
missing ("
Title: Re: Blowing up a bridge
Post by: JamesF1 on 14 Feb 2010, 00:04:22
That's because object is not a valid command in A1/A2.  You'll need to do something like:
Code: [Select]
((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.
Title: Re: Blowing up a bridge
Post by: NightJay0044 on 14 Feb 2010, 01:39:04
Thanks, it worked i just used a gamelogic to replace the player.
Title: Re: Blowing up a bridge
Post by: Barbolani on 16 Aug 2010, 17:01:12
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...

Title: Re: Blowing up a bridge
Post by: Pirin on 18 Aug 2010, 06:05:40
Here's a demo (http://www.kylania.com/arma2/BridgeDemo.zip) I did a while back.
Title: Re: Blowing up a bridge
Post by: Barbolani on 18 Aug 2010, 10:15:29
Thnx man!!!