It shouldn't be possible to crash the game with an Optic script but I'll give your script a smoke test to see if I can reproduce it. You should check to see if your game still crashes with one of the provided Optic packs.
Printable View
I should note it seems to occur most with things like an SMG or something with a high ROF. I haven't hit it in, say, a sniper server
oh, also.. I have since changed the code in the download link tie the killmarker directly to the kill detect, rather than setting 'kills = 1' and running it from the hit detect if kills == 1.
I haven't tested it much since I updated it, couldn't tell you if it still exceptions. has it been working fine for you?
Oh also, side question: When multiple medals are called, is it possible to prevent the medal from sliding to the side?
So I've narrowed down what was crashing, it was something on my end.
I was attempting to replace the hitmarker with a kill marker when a shot kills, which resulted in strange inconsistencies, as the hit/kill can come before and after one another.
This code was crasing:
This, more straight forward although a bit grosser causing two medals to call simultaneously, is not crashing.Code:function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
if (kill == 1) then
display("Kill!", "killmarker_medal", "audio/hm_kill.mp3");
kill = 0;
else
display("Hit!", "hitmarker_medal", "audio/hm_hit.mp3");
end
end
function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
kill = 1;
end
end
Code:function hit_detect(event, killer, victim, player, timestamp)
if(killer == player) then
display("Hit!", "hitmarker_medal", "audio/hm_hit.mp3")
end
end
function player_kills(event, killer, victim, player, timestamp)
if(killer == player) then
display("Kill!", "killmarker_medal", "audio/hm_kill.mp3")
end
end
That shouldn't cause a crash (not possible, in theory) and I wasn't able to reproduce it but I'll run a few tests with that snippet of code to be sure.
Not certain if this is anything you can fix on your end, but it appears as if running "multiplayer_hit_sound_volume 0" completely disables hit detection. Seems more like something built into the CE engine
cool bro cool~
any idea when this update is going to be pushed out to everyone?