Jump to content
Sign in to follow this  
OberSchutze

Two questions

Recommended Posts

I tried looking all over the forums and cannot seem to find what I am looking for. I built a FOB and don't want it to be destroyed by random helicopter crashes etc, and I am also trying to figure out how to make it so that the ALICE and other similar modules don't spawn anything within said FOB. Thank you for your time.

Share this post


Link to post
Share on other sites

You could write

this allowDamage false;

in every objects init of your FOB.

Not sure, if there's a blacklist for ALICE, but for SILVIE you could use

BIS_silvie_mainscope setvariable 
["blackList",[
"Land_Mil_Barracks_EP1",
"Land_Mil_Barracks_i_EP1",
...
]];

Just write the objects classnames into the blacklist and no cars get spawned there.

Share this post


Link to post
Share on other sites

Can I make like a trigger or something to establish like a box that can't be damaged? Or is it a per item only basis?

Share this post


Link to post
Share on other sites

If you just want objects to remain undamaged some thing like this should work.

Place a game logic in the center of the FOB name center

Place the following in a trigger with a slight delay so it activates after the base has fully spawned

items =NearestObjects [center, [], 50];{_x addEventHandler ["HandleDamage",{0}]} foreach items;

That will prevent every thing from being damaged including vehicles.

You can filter that to allow some damage to some items and not others.

items =NearestObjects [center, ["buildings"], 50];{_x addEventHandler ["HandleDamage",{0}]} foreach items;

Will only stop buildings from being destroyed.

The radius 50 will need to be adjusted to fit the FOB.

Share this post


Link to post
Share on other sites

It gives an error. invalid number in expression. nm I just had to take the s off of items. works great thanks!

Edited by MikeJHunter

Share this post


Link to post
Share on other sites
It gives an error. invalid number in expression. nm I just had to take the s off of items. works great thanks!

Yes that can be any name as it's just a variable, items is a reserved command so that's why it failed.

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  

×