Blockland Forums > Modification Help
Adding sound to a playertype?
Pages: (1/1)
-Triforce-:
ive been making playertypes and im having trouble adding sounds but.....when i put the sounds in and add the script they dont work....anyone know the corect script to add Player (death, hurt, Jump) sounds into my playertype?
Honorable:
I don't really have to much info on how to do this. But i copied this from Zombies - Witch.
function RotWitchZombie::SpecialAttack(%this,%onshot)
{
if(isobject(%this) && %this.lastspecial+5000 < getsimtime())
{
%this.playaudio(2,"WitchAttack" @ getrandom(1,2) @ "Sound");
%this.lastspecial = getsimtime();
}
}
You should try somthing like
function YOURPLAYERNAME::Jump(%this,%onshot)
{
if(isobject(%this) && %this.lastspecial+5000 < getsimtime())
{
%this.playaudio(2,"WitchAttack" @ getrandom(1,2) @ "Sound");
%this.lastspecial = getsimtime();
}
}
I don't really know. Anyway, Good luck!
Pages: (1/1)