Jump to content
Sign in to follow this  
major_upset

How do I blow up a bridge?

Recommended Posts

I've got a mission where I want a bridge to blow up, as a APC (non-player) drives across. I've looked through the biki and tried.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_nObject =position APC1 nearestObject 161373 setdammage 1

In a script, only to find it do's...

Fu*k all! The APC just drives across and away.

Any help would be nice.

Share this post


Link to post
Share on other sites

Your syntax is just plain wrong. Setdammage doesn't return anything, so get rid of the '_nObject ='. You're actually trying to combine 2 different ways of doing it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(position APC1 nearestObject 161373) setdammage 1

OR

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nObject = position APC1 nearestObject 161373; nObject setdammage 1

Also a lot of people keep making the mistake of using local variables (determined by an underscore in front of them) in the mission editor dialogs, but these fields are all global space and will only accept global variables (variables that don't start with underscores) with the exception of certain reserved local vairables used with other commands (like _X in forEach/count and _this in eventhandlers).

Share this post


Link to post
Share on other sites

A nice arma guide slapping the hand of people using the underscore + all editing ways would be quite nice actually wink_o.gif

Share this post


Link to post
Share on other sites
Your syntax is just plain wrong. Setdammage doesn't return anything, so get rid of the '_nObject ='. You're actually trying to combine 2 different ways of doing it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(position APC1 nearestObject 161373) setdammage 1

OR

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nObject = position APC1 nearestObject 161373; nObject setdammage 1

Also a lot of people keep making the mistake of using local variables (determined by an underscore in front of them) in the mission editor dialogs, but these fields are all global space and will only accept global variables (variables that don't start with underscores) with the exception of certain reserved local vairables used with other commands (like _X in forEach/count and _this in eventhandlers).

Thanks man worked first time. yay.gif I'm used to the OFP way of nukeing stuff  pistols.gif

Share this post


Link to post
Share on other sites

Not that this is what you wanted, but I found a real funny video of blowing up the ArmA bridges.  Forgot what forums I found them at, but the music is quite hillarious.  Good for a laugh and to see how a human player does it.

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  

×