| Blockland Forums > Suggestions & Requests |
| randomized pain sounds |
| << < (2/3) > >> |
| MunkeyCheez:
--- Quote from: Danny Boy on July 01, 2013, 05:07:21 PM ---PM them to me. --- End quote --- will do in the morning. |
| MunkeyCheez:
--- Quote from: Danny Boy on July 01, 2013, 05:07:21 PM ---PM them to me. --- End quote --- sent them |
| Port:
--- Code: ---datablock AudioProfile(randomPainSound1) { ... }; datablock AudioProfile(randomPainSound2) { ... }; package randomPainSounds { function player::playPain(%this) { serverPlay3D("randomPainSound" @ getRandom(1, 2), %this.getHackPosition()); } }; activatePackage(randomPainSounds); --- End code --- |
| Danny Boy:
Here you go. https://dl.dropboxusercontent.com/u/19324878/Sound_RandomPain.zip I also used the death sounds which were included in the folder you gave me so to avoid issues I wouldn't have Sound_DeathYells enabled when you have this enabled and vice versa. |
| Port:
--- Code: --- function Armor::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType) { if(%obj.client.getClassName() $= "GameConnection") { if(!%client.justdied) { if(%damage > 0) %obj.client.player.PlayRandomPain(); } } return Parent::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType); } function GameConnection::onDeath(%client) { %client.justdied = 1; %client.player.PlayRandomDeath(); return Parent::onDeath(%client); } function GameConnection::spawnPlayer(%client) { %client.justdied = 0; return Parent::spawnPlayer(%client); } --- End code --- What's this? You don't define Player::playRandomPain anywhere, and you've already modified Player::playPain to play random pain sounds anyway. |
| Navigation |
| Message Index |
| Next page |
| Previous page |