Jump to content
Sign in to follow this  
Guest

Setting damage to 0 to map objects

Recommended Posts

Guest

Hey

Im trying to remove some objects that are getting units stuck on their paths (telephone pole lol), anyhow, I cant find a proper input for setdammage along with the object id that will work.

Init_Destroy.sqs

;Executed from Init.sqs

#Destroy some poles ai getting stuck on

_array = _array + [24587,393456]

{object _x setdammage 1} forEach _array

_array = []

#Destroy some buildings in Bagango

Exit

This brings up an error saying I need a ; before the entire setdammage line, this works in ofp, have no clue how to enter this in Arma to get it to work.

Anyone know by chance how to script Arma island objects destroyed using id numbers?

Share this post


Link to post
Share on other sites
Guest

Thanks for the reply, got it to work with that. wink_o.gif

Bad thing tho, apparently with Arma we can no longer just use an id number with object to destroy a map object, this will mean for me in my mission ill have to place tons of markers down to be used as reference just to make a few cities look leveled crazy_o.gif , where in Ofp it was a matter of just throwing in a bunch of id numbers in an array...

Ah well, least it still can be done

Thanks again for helpin me get that to work m8

Share this post


Link to post
Share on other sites
Guest

Just for the hey of it, at least I can see one can destroy a number of objects within a 50m proximity (50 m is considered safe for using nearestObject) for making a city have destroyed areas, etc..

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

;this script is used to destroy various buildings/objects on map prior to mission start

;Using nearestObject will instantly return the next nearest object after the previous one was destroyed (was setdammage 1), at least this certainly can be used in towns to destroy a multitude of buildings nearest a marker, then just delete the markers used here, as they serve no further purpose!

#destroy 2 poles in way of ai paths

_nobject = (getmarkerpos "DestroyPole") nearestObject 24587

_nobject setdammage 1

_nobject = (getmarkerpos "DestroyPole") nearestObject 393456

_nobject setdammage 1

deleteMarker "DestroyPole"

Exit

it does instantly remove a destroyed map object and moves on to the next

Share this post


Link to post
Share on other sites

OT, but would you be the Special Ed I have come to know from Battlefield2?

on topic.. Do poles disappear if you setdammage1 them? or do they have a ruin?

I didnt see any 'pole ruin' object in the editor, so I am assuming the answer is they just disappear.

Can you provide a screenshot of what Parasio looks like when made complete rubble? rofl.gif

Share this post


Link to post
Share on other sites
Guest

Dont have that game, must be an impersonator! tounge2.gif

The poles just fall over, no change in appearance.

Cant beleive the group got stuck on that pole in particular, it was out in the middle of nowhere on a mountian range peak (pole was part of line of telephone poles going across wilderness).

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  

×