View Single Post
Old 11-01-2017   #3
Sometimes I sprite "things"
-CG7244-'s Avatar

Or, you can do that in Lua:

addHook("ThinkFrame", function(p)
    for p in players.iterate
	    if and == "knuckles" --character that will play the sound
		    if not P_PlayerInPain(p)
			    p.readytodosound = 1
				p.dosound = 0
			elseif p.readytodosound
                p.dosound = 1
				p.readytodosound = 0
                p.dosound = 0
            if p.dosound
                S_StartSound(, sfx_buzz3)			
"sfx_buzz3" is the sound that will be played, and to make it play once, you need to make a custom variable like I did.

P_PlayerDoPain, is the action when the player gets hurt.

EDIT: You always need to use the "sfx_" to use a sound, example, if you want to use the sound "DSBUZZ3" , you will write "sfx_buzz3" I mean, without the "DS", also, can be any sound, including custom ones. I hope this helped you.

Anyway, remember, if you want to use it with another character, replace "knuckles" with the character's SKIN NAME like: "skinname" .
"The more detail that I put in the sprite, means the effort that I put into it."

Last edited by -CG7244-; 11-01-2017 at 11:31 PM.
-CG7244- is offline   Reply With Quote