Page MenuHomeFeedback Tracker

"allowDamage false" and "enableSimulation false" aren't working properly when doing it with original map objects
New, WishlistPublic

Description

After receiving some help about making some specific objects indestructible (http://forums.bistudio.com/showthrea...rking-Properly), I figured out that the following code doesn't applies to some original map objects:

if (isServer) then {{_x allowDamage false; _x enableSimulation false} forEach nearestObjects [this, ["Building"], 780];};

In that radius (780 meters), I don't receive any damage if I hit a fence, for example. But I still can run over the fence, so it's falling to the ground yet. And, yes, their classnames are included on 'Building'.

There's a video showing this: http://youtu.be/iQz_zCBkWQg
It seems that "lamps on" can't be destroied, but "lamps off" can.

Details

Legacy ID
1797780449
Severity
None
Resolution
Open
Reproducibility
Always
Category
General
Steps To Reproduce
  1. Go to mission editor.
  2. Place the above code as a game logic (objects).
  3. Test it!

Event Timeline

BlackShot edited Additional Information. (Show Details)
BlackShot set Category to General.
BlackShot set Reproducibility to Always.
BlackShot set Severity to None.
BlackShot set Resolution to Open.
BlackShot set Legacy ID to 1797780449.May 7 2016, 7:48 PM

allowDamage should be executed on all clients for static objects and enableSimulation should be enableSimulationGlobal if you limit it to the server otherwise must execute on all clients too if just enableSimulation.

Well, if I put this on game logic, shouldn't it be already executing on all clients? I also tried enableSimulationGlobal, but it still not working yet. I still can run over fences and other objects, for example.

To clarify, I just want to do some area indestructible by car hits etc.

Just tested myself, fences have some strange behaviour, my guess because of map optimisation. They cannot be hidden either. Knocking fence over and then setting damage to 0 might or might not put it up again. allowdamage and enablesimulation both have no effect.

Oh, note that if you put a fence from the editor, it works fine with the init code "allowDamage" or "enableSimulation". It just doesn't work when it's about original map objects.

Well, thank you for testing that. Could it be something to be seen by devs? Do I need to proceed with extra steps?

That is what this FT is for.

Well, so thank you for the attention! I will be waiting anxious! ;)