Jump to content
Sign in to follow this  
nullrick

Setting allowed damage for buildings (using AiA TP mod)

Recommended Posts

Is there a way to (within the editor) disallow damage to buildings specifically? I don't want to affect damage received by vehicles at all. I'm using the Zargabad terrain in the All in Arma Terrain Pack mod.

Right now I'm focusing on the main mosque building in the center of the town as well as everything inside the surrounding walls. The surrounding walls are a focus as well.

Share this post


Link to post
Share on other sites

Is this done with a trigger or game logic?

This is what I've come up with so far. (position this nearestobject XXXXX) allowDammage false

I have no idea if it will work yet though.

Share this post


Link to post
Share on other sites

Getting the IDs is done with your eye balls, but actually looping through them I guess could be done in a trigger, though it would be a short easy script to execute on mission start.

{  _x allowDamage false} forEach _arrayOfObjectIDs;

EDIT: Just kinda realized nearestObject is kinda redundant if you use the code I just put above :p.

Edited by JShock

Share this post


Link to post
Share on other sites

Hah, I knew how to find the IDs just fine. I should have been more clearer. I needed to know about the trigger or logic bit, so thanks. But now I don't know what you mean by "execute on mission start". Are we still talking about a trigger or a separate txt document thing? And is your code definitely one that works in comparison to mine? Would I just paste that in a trigger and list the IDs in question after the semicolon?

----Edit

Oh ok. Good to know. Still typing in IDs in different places in your code to see how it works.

Share this post


Link to post
Share on other sites

In my code where you see "_arrayOfObjectIDs" you would replace that with something like this (psuedo):

[12345,67891,01234,...]//all are object IDs

Share this post


Link to post
Share on other sites

When you said that "I guess could be done in a trigger" did you mean that you were actually guessing, or were you saying it would work but there was an easier way to do it?

Share this post


Link to post
Share on other sites

The latter, I avoid triggers like the plague.

Share this post


Link to post
Share on other sites

Ah. I still don't know of any other alternative. I've gotten a few hints from what you've said earlier that there is some other magical way of doing this. But it's still beyond me it would seem.

Share this post


Link to post
Share on other sites

Yeah, create a file named initServer.sqf and put the following:

{
  _x allowDamage false;
} forEach [12345,67891,01234,...];//all of your object IDs

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  

×