| Blockland Forums > Modification Help |
| Kill Icon String on Death |
| (1/5) > >> |
| Swollow:
How would I get the KillIcon from %damageType? --- Code: ---package DeathMod { function gameConnection::onDeath(%client, %KillerPlayer, %Killer, %damageType, %a) { Parent::onDeath(%client, %KillerPlayer, %Killer, %damageType, %a); if(%Killer == %Client) { MessageAll('', %Client.name SPC "Self Deleted"); } if(%Killer != %Client) { MessageAll('', %Killer.name SPC %damageType SPC %Client.name); } } }; activatePackage(DeathMod); --- End code --- |
| Greek2me:
Add this to the end of the function: --- Code: ---if(isObject(%killer) && %killer != %client) %deathCI = getWord(getTaggedString($DeathMessage_Murder[%damageType]),1); else %deathCI = getWord(getTaggedString($DeathMessage_Self Delete[%damageType]),1); echo(%deathCI); --- End code --- |
| Swollow:
I'm trying to remake death I'm using hide kills along with this is there any way for me to make it with hide kills enabled? |
| jes00:
--- Quote from: swollow on December 26, 2011, 12:15:02 PM ---I'm trying to remake death I'm using hide kills along with this is there any way for me to make it with hide kills enabled? --- End quote --- Try this: --- Code: ---package DeathMod { function gameConnection::onDeath(%client, %KillerPlayer, %Killer, %damageType, %a) { Parent::onDeath(%client, %KillerPlayer, %Killer, %damageType, %a); if($Pref::HideKills::enabled !== 0) { if(%Killer == %Client) { MessageAll('', %Client.name SPC "Self Deleted"); } if(%Killer != %Client) { MessageAll('', %Killer.name SPC %damageType SPC %Client.name); } if(isObject(%killer) && %killer != %client) %deathCI = getWord(getTaggedString($DeathMessage_Murder[%damageType]),1); else %deathCI = getWord(getTaggedString($DeathMessage_Self Delete[%damageType]),1); echo(%deathCI); } } }; activatePackage(DeathMod); --- End code --- |
| Swollow:
that wouldn't work because hide kills is on and your saying only to execute this if it is off I want hide kills to be on I'm rewriting the death code all I need right now is to simultaneously hide kills and get the kill icon string |
| Navigation |
| Message Index |
| Next page |