CapBlackShot 11 Posted October 26, 2014 Hello, After receiving some help about making some specific objects indestructible (http://forums.bistudio.com/showthread.php?184710-Game-Logic-Not-Working-Properly), I figured out that the following code doesn't applies to city fences (for lamps and some other objects, for example, it works): if (isServer) then {{_x allowDamage false; _x enableSimulation false} forEach nearestObjects [this, ["Building"], 780];}; Code added as game logic on map editor. 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'. Any ideas on this? Thanks! Share this post Link to post Share on other sites
dreadedentity 278 Posted October 26, 2014 Is this a host 'n play server or dedicated server? Share this post Link to post Share on other sites
iceman77 18 Posted October 26, 2014 After looking in the cfg viewer I found Land_Mil_WiredFenceD_F and similar. It's parents do not include "building". Try "Wall_F". Cheers. if (isServer) then {{_x allowDamage false; _x enableSimulation false} forEach nearestObjects [this, ["Building","Wall_F"], 780];}; Share this post Link to post Share on other sites
CapBlackShot 11 Posted October 26, 2014 (edited) After looking in the cfg viewer I found Land_Mil_WiredFenceD_F and similar. It's parents do not include "building". Try "Wall_F". Cheers. if (isServer) then {{_x allowDamage false; _x enableSimulation false} forEach nearestObjects [this, ["Building","Wall_F"], 780];}; Thank so much for the tip, but unfortunately it didn't solve yet! :( I did a 'parent hint' in the game for "Land_Net_Fence_8m_F". Take a look: http://i.imgur.com/wGR7p11.jpg (443 kB) Shoudn't it be working? :confused: EDIT: Actually, I did some more tests and I realized that it all is really weird. Some lamps can be "runned over" and some can't. Check this: Edited October 26, 2014 by CapBlackShot Share this post Link to post Share on other sites
f2k sel 164 Posted October 26, 2014 That's how it is with original objects some can be protected and some can't. The razor fences around the Airport Stratis can be protected but the same ones around one of the small hill bases can't. It's probably the same for other objects. Share this post Link to post Share on other sites
CapBlackShot 11 Posted October 27, 2014 That's how it is with original objects some can be protected and some can't.The razor fences around the Airport Stratis can be protected but the same ones around one of the small hill bases can't. It's probably the same for other objects. That's really weird. If I put the object from the editor and add the init parameter, it works fine. And, as you can see on the video, some lamps from the same classname work. Some don't. Share this post Link to post Share on other sites
CapBlackShot 11 Posted October 31, 2014 Any other ideas, guys? Share this post Link to post Share on other sites
dreadedentity 278 Posted October 31, 2014 You could always spawn identical objects right on top of the old ones and make those invincible Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted November 1, 2014 (edited) Any other ideas, guys? Walls, trees and other such objects cannot be manipulated or simulated in this manner. There are exceptions, but those walls are not one of them. _01 = [0,0,0] nearestObject 1120651; _02 = [0,0,0] nearestObject 1120653; {_x enableSimulation FALSE; _x allowDamage false;} count [_01,_02]; If that doesn't work, nothing will. ... A clue for what can be manipulated is to use your cursor. Point it at a map object, if you get a return value, you can manipulate, simulate and store respective data to it. There are some issues with that as well, since map objects are streamed locally and thus in MP once a players machine stops rendering it, any variables attached to it are killed locally. Variables attached to an object on one players machine may not exist on the other players machine. There are ways around this using databases and public variables, but that is quite messy and intensive. In short ... No, no other ideas. :) As for why it is this way ... That was a decision by BIS to sacrifice some fidelity to secure reasonable performance standards. If all of the millions of map objects on Altis were simulated to that extent, your frame rate would tank dramatically. So, many things are baked in and cannot be manipulated. Walls and trees are the two main examples. Edited November 1, 2014 by MDCCLXXVI Share this post Link to post Share on other sites