Jump to content
Sign in to follow this  
cfsfirefighter

Show Id Numbers

Recommended Posts

Hey guys i have a quick question im working on a mission on the map i need to make room to fit another building so i created a trigger which says this

{hideobject _x;} foreach (nearestobjects [getpos maphouse3,  ["Fence_Ind_long","Land_a_stationhouse","Fence_Ind","Land_Mil_Barracks"], 75]);

Which hides the building but not the fence around it even though i have added the class name etc after banging my head and surfing Google thought i would come and ask the experts i see in the editor that the fence has ID Numbers is there a way that i can create a trigger to hide the object associated with these ID Numbers??

Cheers

CfsFireFighter

Share this post


Link to post
Share on other sites

Sure:

_fence = getPos mapHouse3 nearestObject 78565;
_fence hideObject true;

Something like that.

Share this post


Link to post
Share on other sites
Sure:

_fence = getPos mapHouse3 nearestObject 78565;
_fence hideObject true;

Something like that.

it doesn't like that when i try to put it in the trigger its says the stuff about space in global or something like that

---------- Post added at 20:20 ---------- Previous post was at 20:12 ----------

Local Variable in global space is the full thingo

Share this post


Link to post
Share on other sites

Local: _fence

Global: fence

So use in trigger:

fence = getPos mapHouse3 nearestObject 78565;
fence hideObject true;

;)

Share this post


Link to post
Share on other sites

Try fence setDamage 1 instead of using hideObject. It will make walls/fences etc. fall over instead of disappearing, but it may be the only option you'll have.

Share this post


Link to post
Share on other sites
Try fence setDamage 1 instead of using hideObject. It will make walls/fences etc. fall over instead of disappearing, but it may be the only option you'll have.

Awesome that worked is there a way i can list multiple id numbers instead of creating a new logic for every ID Number

Share this post


Link to post
Share on other sites
Awesome that worked is there a way i can list multiple id numbers instead of creating a new logic for every ID Number

Reusing the code from your OP, something like this should work:

{(getPos mapHouse3 nearestObject _x) setDamage 1} forEach [12345, 23456, 34567];

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  

×