Jump to content
Sign in to follow this  
Khalashnikovf

Destroy all Walls in city

Recommended Posts

Title says pretty much everything.

I was trying to destroy wall and fences with this...

_array = _pos nearObjects ["NonStrategic", 400];
{_x setDamage 1;} forEach _array;

but every building is destroyed (as I wanted), but all fences, market tents and walls are untouched.

Maybe I have to use other type of Static, but dont know what type.

Some help pls?

Share this post


Link to post
Share on other sites

If the walls don't have a classname, here's a trigger I've found useful:

Name: demolitiontrigger1

Condition: true

On act: {_x setDamage 1} forEach nearestObjects [demolitiontrigger1,[],10]

The last number is the radius of the effect and the trigger size can be made the same to give a clear picture of what it destroys. The key part is the empty [] array in place of a class that makes the nearestObjects command look for any kind of object and not only ones with classnames.

Share this post


Link to post
Share on other sites

Works fine, but its weird that Static class walls is actually not a class :-/

Thx for help Celery.

-----------------------

Any other solution focusing on walls only is still welcome :)

Share this post


Link to post
Share on other sites

nope just to be made aware plants/trees/vegetation/walls/fences/ and other misc objects dont actually have a class name or library associated with them, so you cant manipulate them like you normally would with objects that do have a classname, only way to access these non classed objects is by passing an empty array, which will force to check all object types.

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  

×