So I was looking through old scripts I have laying around and I decided to toss the good old "gut human" script on my server for fun.
I was looking at the code and I saw the part about cutting yourself on the knife and it makes you lose blood and shake like you're in pain. I would like to add infection to that as well.. so if the player cuts himself, he will be in pain and infected and lose blood.
if (_rnd < 0.1) then { r_player_inpain = true; r_player_infected = true; player setVariable["USEC_inPain",true,true]; player setVariable["USEC_infected",true,true]; r_player_blood = r_player_blood - 3000; cutText ["Your knife slipped and you cut your hand. You have been infected.", "PLAIN DOWN"]; };
i even tried
r_player_inpain = true;
player setVariable["USEC_inPain",true,true];
r_player_infected = true;
player setVariable["USEC_infected",true,true];
but for some reason neither work. the player does lose blood however. What am I doing wrong?