Phone_Guy Posted January 2, 2014 Report Share Posted January 2, 2014 So I added the building class names to CPC. It didn't work at first. I then added the buildings directly via the database. Those ones are now indestructible. Now I simply have to find an easy way to move my map additions from SQF to the Database. But the script it self works great and has allowed me to open up new avenues for combat without risking constant base destruction. Link to comment Share on other sites More sharing options...
Axe Cop Posted January 2, 2014 Report Share Posted January 2, 2014 Not a good idea to move everything to the database, just apply the indestructible changes to the objects in the SQF file that has to work! :) this script is just disableing the damage handler and the simulation like this, so what otter said should work! _object addEventHandler ["HandleDamage", {false}]; _object enableSimulation false; that is all you have to apply to every single object in the SQF. Link to comment Share on other sites More sharing options...
Phone_Guy Posted January 2, 2014 Report Share Posted January 2, 2014 Not a good idea to move everything to the database, just apply the indestructible changes to the objects in the SQF file that has to work! :) this script is just disableing the damage handler and the simulation like this, so what otter said should work! _object addEventHandler ["HandleDamage", {false}]; _object enableSimulation false; that is all you have to apply to every single object in the SQF. So I have that a shot here is snippet from my SQF that loads extra buildings. _bldObj = objNull; if (true) then { _bldObj = createVehicle ["MAP_A_Castle_Bergfrit", [2630.4084, 1235.0073, 2.7270193], [], 0, "CAN_COLLIDE"]; _object addEventHandler ["HandleDamage", {false}]; _object enableSimulation false; _bldObj setDir 183.18703; _bldObj setPos [2630.4084, 1235.0073, 2.7270193]; }; I updated the sqf with the added code. Restarted the server and the buildings still takes damage and collapses. Any advice? Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 2, 2014 Report Share Posted January 2, 2014 _bldObj = objNull; if (true) then { _bldObj = createVehicle ["MAP_A_Castle_Bergfrit", [2630.4084, 1235.0073, 2.7270193], [], 0, "CAN_COLLIDE"]; _bldObj addEventHandler ["HandleDamage", {false}]; _bldObj enableSimulation false; _bldObj setDir 183.18703; _bldObj setPos [2630.4084, 1235.0073, 2.7270193]; }; Axe Cop 1 Link to comment Share on other sites More sharing options...
Axe Cop Posted January 2, 2014 Report Share Posted January 2, 2014 Obviously you have to use the same object... No wonder its not working :p Link to comment Share on other sites More sharing options...
Phone_Guy Posted January 3, 2014 Report Share Posted January 3, 2014 _bldObj = objNull; if (true) then { _bldObj = createVehicle ["MAP_A_Castle_Bergfrit", [2630.4084, 1235.0073, 2.7270193], [], 0, "CAN_COLLIDE"]; _bldObj addEventHandler ["HandleDamage", {false}]; _bldObj enableSimulation false; _bldObj setDir 183.18703; _bldObj setPos [2630.4084, 1235.0073, 2.7270193]; }; This worked great. Thank you for the help! Link to comment Share on other sites More sharing options...
Phone_Guy Posted January 3, 2014 Report Share Posted January 3, 2014 Obviously you have to use the same object... No wonder its not working :P Yeah, its simple things that get me. Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 3, 2014 Report Share Posted January 3, 2014 This worked great. Thank you for the help! Your welcome :) Link to comment Share on other sites More sharing options...
skynetdev Posted January 5, 2014 Report Share Posted January 5, 2014 Hi, all, I need your help. I don't want Indestructible bases but I want to reduce damage for list of my objects (buildings) but cant find where damages is registering for created buildings. I tried many files but can't find it. Maybe somebody know in which file I can find it? Or how to increase armor level for buildings? Link to comment Share on other sites More sharing options...
Axe Cop Posted January 6, 2014 Report Share Posted January 6, 2014 I am not sure but you cant increase the armor by script, only in the config file which is binarized in the cinfig.bin in epoch... So not as easy as you might think, if even possible Link to comment Share on other sites More sharing options...
skynetdev Posted January 6, 2014 Report Share Posted January 6, 2014 I believe that it possible if you will use a EH something like this addEventHandler ["Hit", { ((_this select 2) * 0.5)}]; but I don't know how exactly Or find place where Epoch read first time from "cfgVehicle" armor value of building and then we can increase it Link to comment Share on other sites More sharing options...
dagg929 Posted January 7, 2014 Report Share Posted January 7, 2014 I used to just run this step one, the server_monitor.sqf changes and this does NOT work by itself any longer. Not sure as to why, but yeah. I just satcheled a bunch of stuff down on my server only running that first step. Can anyone confirm that they are only doing the server_monitor changes and that it is fully functioning for them? My only difference is my setpos is setposATL. Would that break it? _object setdir _dir; _object setposATL _pos; _object setDamage _damage; // ### [CPC] Indestructible Buildables Fix if (typeOf(_object) in _cpcimmune) then { _object addEventHandler ["HandleDamage", {false}]; _object enableSimulation false; }; // ### [CPC] Indestructible Buildables Fix if (count _intentory > 0) then { Link to comment Share on other sites More sharing options...
Picking Posted January 10, 2014 Report Share Posted January 10, 2014 hi guys i cannot seem to get this working at all have tried both 1 and 2 methods and neither of them are playing along any suggestions ? thanks Link to comment Share on other sites More sharing options...
GGDayZ Posted January 10, 2014 Report Share Posted January 10, 2014 thx man works like a charme ;) Link to comment Share on other sites More sharing options...
Fuchs Posted January 12, 2014 Report Share Posted January 12, 2014 When youre in the editor and create a object put this in the "init" line of it: _this addEventHandler ["HandleDamage", {false}]; _this enableSimulation false; Nice Halv , but i call it like this ! _this setVehicleInit "this addEventHandler [""HandleDamage"", {false}];"; Has been tested and worx ! Link to comment Share on other sites More sharing options...
Guest Posted January 12, 2014 Report Share Posted January 12, 2014 I have a real big problem, nothing work since 2-3 weeks (maybe after install snapping script, or since version 1.0.3.1) My files: https://www.dropbox.com/s/l2gplit1zw9fu94/indestructibles%20bases%20issue.rar I try many change, but no way, always same problem. If someone can help me, thx! Link to comment Share on other sites More sharing options...
Guest Posted January 12, 2014 Report Share Posted January 12, 2014 Thx a lot Gagi. Normaly I use _tmpbuilt, but for some test I replace it with _object, I will change again for _tmpbuilt I will modify for upgrade and downgrade and test it! Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 12, 2014 Report Share Posted January 12, 2014 Try this https://www.dropbox.com/s/glj5h8qx9w64piz/indestructibles%20bases%20issue.zip Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 12, 2014 Report Share Posted January 12, 2014 BTW: If u use the snap_build the whole _tmpbuilt has to be removed. I did it in the package i uploaded, have fun Link to comment Share on other sites More sharing options...
Guest Posted January 12, 2014 Report Share Posted January 12, 2014 thx a lot!! I will test at next restart ;) Link to comment Share on other sites More sharing options...
Guest Posted January 12, 2014 Report Share Posted January 12, 2014 It's ok, but only upgrade item doesn't work I do this in server_swapObject.sqf _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}]; // Test disabling simulation server side on buildables only. // ### CPC Swap Object Fix _object addEventHandler ["HandleDamage", {false}]; // ### CPC Swap Object Fix Gagi: "also you have only edited the build function not the upgrade or downgrade so the objects are still destroyable after upgrading or downgrading again..." I don't exactly understand what you explain, I can't find "upgrade" or "downgrade" files to modify in tuto. Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2014 Report Share Posted January 13, 2014 Thx Gagi!! edit: Always same pb with upgrade items :s, and after some test on player bases, the problem started when I add snapping system Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2014 Report Share Posted January 13, 2014 It's really weird, because in the pas iI hven't do this modifications on "upgrade" or "downgrade" and everything was ok, since I install Snapping it doesn't work... and it's a real big problem for the players on my server Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 13, 2014 Report Share Posted January 13, 2014 The snappin CANT conflict with it, the snapping does NOTHING on down or upgrade, maybe you just dont noticed that the buildings are destructable again after down/upgrade. Send me this file please and i will have a look. server_objSwap.sqf Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2014 Report Share Posted January 13, 2014 https://www.dropbox.com/s/1blypegtqmsztd4/indestructibles%20bases%20issue2.rar Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now