Jump to content
Sign in to follow this  
mechastalin

Activating a trigger on bridge destruction

Recommended Posts

A pretty common mission objective, and I had the scripting info saved somewhere but lost it in a reformat. I want a trigger to activate when a bridge has been completely destroyed, the bridge in question being the rail bridge at 131-081 near the Factory near Solnichny.

Thanks.

Share this post


Link to post
Share on other sites

Place a GameLogic on the bridge called bridgeMonitor.

Then create a Trigger with the Condition of:

!alive nearestObject [bridgeMonitor, "House"];

Share this post


Link to post
Share on other sites

You're quite welcome. I know there's a method for referring to it via it's id number (961831 in that bridge's case), but can't for the life of me remember how. :)

Share this post


Link to post
Share on other sites
(getDammage (position objective1 nearestObject 376489) > 0.8)

Objective1 is the trigger's name itself, and the object ID's can be seen when you zoom in and had the IDs button enabled.

Share this post


Link to post
Share on other sites

I swear I tried that, but it was at 3am, so who knows! :)

Share this post


Link to post
Share on other sites

Alright this is a dumb question but what about two objects? I have two power transformers that I want to have blown up.(They are side by side.) One I have named "bridgeMonitor" and the other named "bridgeMonitor_1".

How would I add "bridgeMonitor_1" to:

!alive nearestObject [bridgeMonitor, "House"];

so both need to be destroyed. I can't seem to get it to work.

Edited by Manzilla

Share this post


Link to post
Share on other sites

Could you just have

!alive nearestObject [bridgeMonitor, "House"] && !alive nearestObject [bridgeMonitor1, "House"];

Or something like that? Considering you need/want them both to be destroyed for the trigger, right?

May be wrong syntax slightly, but I hope that's it.

Share this post


Link to post
Share on other sites
Could you just have

Or something like that? Considering you need/want them both to be destroyed for the trigger, right?

May be wrong syntax slightly, but I hope that's it.

Exactly what I'm looking for. I thought I tried this but maybe the syntax was wrong.

Thanks for the quick reply.

EDIT:

Yup, that worked. And I see what I did wrong. I had:

!alive nearestObject [bridgeMonitor, "House"][b];[/b] && !alive nearestObject [bridgeMonitor1, "House"];

That's why it would let me close the trigger.

Tanks again bud!

Edited by Manzilla

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  

×