Soul Posted March 16, 2014 Report Share Posted March 16, 2014 Very nice, however on our servers this would be useles as our players do it somewhat different. They eject and let the heli crash into it so it doesnt detect the empty vehicle. I've tried near exact code before to counter this. Now i know its possible to detect a moving empty vehicle but that comes at the cost of a rather severe performance hit due to it requiring a while {true}do{}; loop on all vehicles accros the map or all vehicles near certain locations or like you did near plot poles wich is btw a very smart approach to this. Link to comment Share on other sites More sharing options...
Sellis Posted April 2, 2014 Report Share Posted April 2, 2014 Thinking about this problem I have a different suggestion. What if we added the code to also remove the eject option from a player in a heli when the code triggers? We could also remove the engine off option in case a player is willing to die with their heli. Of course, they could still land as hard as they can on the base and if the chopper is damaged, it might blow up, but they would die and that would be logged. I believe this would be simple "removeplayeraction" code similar to what is in selfactions.sqf -Shawn Link to comment Share on other sites More sharing options...
Armifer Posted April 3, 2014 Report Share Posted April 3, 2014 Triggers check for its conditions to be true once every half second. You should be careful using triggers created client side, as they should always go server side since they are global and sync to all JIP players. When a player leaves a server with a client created trigger, the server takes ownership of the trigger, it does not delete it. What this means is that when that same player joins the server again, his client creates another trigger. This will happen for every player that joins/disconnects from the server. You can imagine what this means for server performance, especially with the trigger checking for its conditions every half second. If there are 10 bases on your server, and 10 players, that's 10 triggers per player, for a total of 100 triggers. When 1 player dies, aborts and re-logs or disconnects, the server takes the 10 triggers. When he joins he creates 10 more. If this goes on for say an hour, it is possible that your server will have taken ownership of 1000 triggers. That means your server is using precious CPU power to check every half second, 1000 things. Keep the server up for longer than this with same amount of players join/leaving and it will create desync and instability. Same type of thing happens when there are many "waituntil" commands or while loops server side with no sleep interval (waituntil is far worse, as it checks its conditions every frame, that's 60 cycles per frame being used on your precious CPU). Might be better off to move this server side, and to have it communicate with only individual players when they reach the 30m trigger radius. Or set up public variable client/server that fires off only to the player entering the radius. Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted April 3, 2014 Author Report Share Posted April 3, 2014 yep i know that now, but back when i created the script i didn't and i havent used it since i learned this. but i'm leaving it here so other that have a use for it in some way can take it and build from it Link to comment Share on other sites More sharing options...
Sellis Posted April 4, 2014 Report Share Posted April 4, 2014 Maybe it would be better to have a special version of the base "safezone" or "shield" scripts that only make any stationary vehicles invulnerable to explosion/collision damage. That way trolls could still shoot up vehicles, but they would only destroy their own vehicle by ramming. Another similar script is the one that you use to make buildings invulnerable. Link to comment Share on other sites More sharing options...
Tobias Solem Posted April 8, 2014 Report Share Posted April 8, 2014 Has anyone been able to make this work server-side or with a zone? Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted April 8, 2014 Author Report Share Posted April 8, 2014 just run the trigger server side? and the vars on the trigger on the client i will see if i get the time to update it mate. some time next week i think Link to comment Share on other sites More sharing options...
Tobias Solem Posted April 8, 2014 Report Share Posted April 8, 2014 just run the trigger server side? and the vars on the trigger on the client i will see if i get the time to update it mate. some time next week i think I have no idea how though. :) Link to comment Share on other sites More sharing options...
WGC GeekGarage Posted April 8, 2014 Author Report Share Posted April 8, 2014 i've updated first post try it now and see it it triggers, if it does then great, then the trigger issue we were talking about is gone as the trigger now loads on the server and is sent to the client :) in my mind here at 1:21 am it should work :) Update, i just had a quick look and no it won't work as it refers to a vars for a trigger on the client that does not excist... don't use it Link to comment Share on other sites More sharing options...
Buck0 Posted May 10, 2014 Report Share Posted May 10, 2014 any chance of this being updated to work server side geek? 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