major_upset 0 Posted April 5, 2007 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
Big Dawg KS 6 Posted April 5, 2007 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
BLSmith2112 0 Posted April 6, 2007 A nice arma guide slapping the hand of people using the underscore + all editing ways would be quite nice actually Share this post Link to post Share on other sites
major_upset 0 Posted April 6, 2007 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. I'm used to the OFP way of nukeing stuff  Share this post Link to post Share on other sites
Tom_Anger 0 Posted April 6, 2007 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
major_upset 0 Posted April 6, 2007 LOL! Major bridge Pwnage! Â Share this post Link to post Share on other sites