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?
Last edited by t3h m00kz; October 6th, 2015 at 07:02 PM.
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
Last edited by t3h m00kz; October 8th, 2015 at 07:37 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks