Jump to content
Sign in to follow this  
Lucky44

Detecting damage on a bridge?

Recommended Posts

I'm trying to figure out how to detect if a bridge (on a map) has been destroyed (getting the damage level of the bridge). 

 

In Arma 2, you could toggle on the objects ID#s in the editor. I don't see a way to do that in the Eden editor; am I missing it? 

 

I'd like to be able to do this on BIS Arma 3 maps, BIS Arma 2 maps (using CUP), and 3rd party maps, if possible.

 

What are the options for detecting the damage level of a bridge or building object that is part of the map? 

Share this post


Link to post
Share on other sites

Thanks, AZCoder. 

 

I was able to take what they said in that thread and put this together.

 

Step A: Create a name for the bridge I want to check for damage. (Could be a building too.)

 

  1. Get in game near the bridge/building/etc. you want to work with.
  2. Look at the bridge.
  3. Open the Debug Console (via ESC). In the bottom half, there's a box under the word Watch:  and in that box, type: typeof nearestObject screenToWorld getMousePosition
  4. That will start immediate reporting of the object your cursor is on to the screen. It's a little wonky, but play with it and it'll work.
  5. Copy down that className. In my case, the bridge was "Land_rails_bridge_40"

Step B: Create a name for the bridge and create a trigger to watch for damage to it.

  1. Place a Game Logic object and in the Variable Name block, give it a name (e.g., logic1 or BridgeLogic or whatever)
  2. In the init box of the Game Logic, put this: bridge1 = nearestObject [getPos logic1, "Land_rails_bridge_40"]; but broken down as follows:
    1. bridge1 is the name I'm going to use for the nearest bridge to the Game Logic. You can use whatever name you want, but remember it for the trigger coming up.
    2. logic1 is the name I gave to the Game Logic. You can use something else (from Step A above).
    3. "Land_rails_bridge_40" is the className of the bridge in my case. Yours could be a building, a different bridge type, etc.
  3. Close that and create a new Trigger.
  4. The only fields to touch are Condition and On Activation. 
  5. In Condition, put this: (damage bridge1) >= 1   (That will check the damage on the bridge, and if it's 100%, the condition will fire the trigger)
  6. For the On Activation, you can put whatever you want to happen when the trigger fires, and it can be multiple things. To test it, I just put Hint "Bridge is down!";  You can have Task objectives be completed, etc., etc.

That's all there is to it.

Share this post


Link to post
Share on other sites

AFAIK bridges are indestructible, they used to be but not anymore, so I doubt this would work.

Share this post


Link to post
Share on other sites

@lucky44 - Thanks for posting those steps. May I ask what map you tested that on? None of the maps that I tried would identify a bridge as an object anymore. I've also tried using explosive charges, bombs, and rockets on a couple bridges with no damage at all, as killzone suggested. Which is a pity. I liked blowing up bridges just to relieve tension :-D

Share this post


Link to post
Share on other sites

AFAIK bridges are indestructible, they used to be but not anymore, so I doubt this would work.

 

I'm using the Summer Chernarus map, KK, and at least some of the bridges are destructible. Just have to test to see.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×