Jump to content
Sign in to follow this  
Rick1384

hideObjects help?

Recommended Posts

Hello fellow map editors / mission makers,

Im going to get right to the point. Im trying to hide a certain section of a town as its in the way of my mission plan.

I wrote (nearObjects [[this,1000] , ["building"], 1000]) hideObject true; in the game logic thinking I could add a radius to the (nearestObject [this,"building"]) hideObject true; init and it would work with a radius instead of having a gamelogic for every single building.

(They are very small shanties all over the place that I want to clean up.)

Can anyone help me develope this Init so that it includes a radius instead of just the specific building I put it over?

I appreciate any help.

Rick

Edited by Rick1384

Share this post


Link to post
Share on other sites
_pos = position player; // Could be a marker instead, like: getMarkerPos "hideCenter"
_radius = 1000;          // In meters

_buildings = (_pos nearObjects ["building", _radius]);
{
_x hideObject true;
} forEach _buildings;

Share this post


Link to post
Share on other sites
_pos = position player; // Could be a marker instead, like: getMarkerPos "hideCenter"
_radius = 1000;          // In meters

_buildings = (_pos nearObjects ["building", _radius]);
{
_x hideObject true;
} forEach _buildings;

So what exactly am I writing? I dont understand.

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

I figured it out.... thank you so much for the help Animus

Share this post


Link to post
Share on other sites

The best way is to find a superclass of the objects classes you want to delete (because it will help you avoiding loops) and switch them with "building" in the code I wrote above.

Then you'd change "_x hideObject true" with "deleteVehicle _x" and voila, buildings be gone :D

If you just want to delete specific buildings, you can of course use the direct classname (e.g. "Misc_TyreHeap").

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  

×