Leigham Posted January 24, 2015 Report Share Posted January 24, 2015 im trying to create a script, i dont want to let anything out yet but i can get it to work once like this player addEventHandler ["fired", ["fired", {player setDamage 0.1;}]; but i was wondering if there was a way of setting that 0.1 damage per "fired" Link to comment Share on other sites More sharing options...
TheVampire Posted January 24, 2015 Report Share Posted January 24, 2015 addEventHandler will keep the event there until it gets removed or reset. The Epoch AH automatically resets it though, because setting player addEventHandler ["fired", {false}]; is godmode. Link to comment Share on other sites More sharing options...
Leigham Posted January 24, 2015 Author Report Share Posted January 24, 2015 i was going to set it as godmode, but i was going to warn players if they shot once but then do 0.1 damage per shot after wards ? anyway of doing that within a trigger ? Link to comment Share on other sites More sharing options...
Leigham Posted January 24, 2015 Author Report Share Posted January 24, 2015 is there a way of setting a trigger to be activated by "fired" that way i could on activation deal 0.1 damage then on deactivation remove the eventhandler ? Link to comment Share on other sites More sharing options...
DirtySanchez Posted January 24, 2015 Report Share Posted January 24, 2015 Sorry bud, Epoch has those eventhandlers locked out for us to use.I tried telling someone that in the safe zone thread.My triggers would not work and the culprit was EPOCH so I moved to adding the EPOCH protection zones instead. DirtySanchez 1 Link to comment Share on other sites More sharing options...
Leigham Posted January 24, 2015 Author Report Share Posted January 24, 2015 there has to be a way of getting triggers to work Link to comment Share on other sites More sharing options...
TheVampire Posted January 24, 2015 Report Share Posted January 24, 2015 there has to be a way of getting triggers to work You can get triggers to work, just not the specific ones Epoch uses. If you give us more of an idea of what you are trying to do we might be able to point you to a workaround. Link to comment Share on other sites More sharing options...
DirtySanchez Posted January 24, 2015 Report Share Posted January 24, 2015 Yes Triggers do work and I have them incorporated into my safe zones.Its a 3 part setup with the triggers notifying the player they are entering or leaving the server. DirtySanchez 1 Link to comment Share on other sites More sharing options...
Leigham Posted January 24, 2015 Author Report Share Posted January 24, 2015 i was going to put a notification going into the safezone with player allowDamage false then another leaving the safezone with false, ive tried putting it in my mission.sqm but server wont launch, so was trying to do it in a script which i started here reason why its not working ? Link to comment Share on other sites More sharing options...
DirtySanchez Posted January 24, 2015 Report Share Posted January 24, 2015 i was going to put a notification going into the safezone with player allowDamage false then another leaving the safezone with false, ive tried putting it in my mission.sqm but server wont launch, so was trying to do it in a script which i started here reason why its not working ? Again, its epoch code that is resetting the allowDamage to true no matter what you do. You have to find another route that I could not find. The easy way is to just build the safe zones in the editor using the Epoch protection zones and I mean LOTS of them. Mine are about 1200 to get at all 3 spawn points. I believe I found the new server side update 0.2.5.2a locks out the server settings.pbo Can anyone confirm this info? I might post this question in its own thread. DirtySanchez 1 Link to comment Share on other sites More sharing options...
horbin Posted January 24, 2015 Report Share Posted January 24, 2015 BuiltVehicle addEventHandler ["HandleDamage", { _vehobj = _this select 0; _location = _this select 1; // type string _damage = _this select 2; // type number _sourceobj = _this select 3; _projectile = _this select 4; // type string //ASSERT this EH only active when vehicle owned by AI. if ( isNull _sourceobj) then { _damage = 0; // diag_log format ["##VEHICLE DAMAGE: Reduced to ZERO ########"]; }; _damage }]; Leigham, See the above code. I use this with AI controlled vehicles, so that when they crash into stuff (they are real shitty drivers) they don't go boom, but the vehicles can still be shot at. You should be able to add this to all players when they enter a safe area. Obviously you will need to manipulate it some to get your desired effect. This code runs client side. Link to comment Share on other sites More sharing options...
Leigham Posted January 25, 2015 Author Report Share Posted January 25, 2015 i would have no idea how to manipulate it lol 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