Home   Help Search Login Register  

Author Topic: Blowing up a bridge  (Read 2014 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Blowing up a bridge
« 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..
Who's hyped for Arma4, long live Arma!

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re: Blowing up a bridge
« Reply #1 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...
Ranger, out.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Blowing up a bridge
« Reply #2 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 ("
Who's hyped for Arma4, long live Arma!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Blowing up a bridge
« Reply #3 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.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Blowing up a bridge
« Reply #4 on: 14 Feb 2010, 01:39:04 »
Thanks, it worked i just used a gamelogic to replace the player.
Who's hyped for Arma4, long live Arma!

Offline Barbolani

  • Members
  • *
Re: Blowing up a bridge
« Reply #5 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...


Offline Pirin

  • Members
  • *
Re: Blowing up a bridge
« Reply #6 on: 18 Aug 2010, 06:05:40 »
Here's a demo I did a while back.

Offline Barbolani

  • Members
  • *
Re: Blowing up a bridge
« Reply #7 on: 18 Aug 2010, 10:15:29 »
Thnx man!!!