Floating player on water
by Waleed · in Technical Issues · 08/20/2007 (4:43 am) · 0 replies
Hi 4 all i want to add some code to the player to floating the player when he get into the water like
function Armor::onEnterLiquid(%this, %obj, %coverage, %type)
{
switch(%type)
{
case 0: //Water
// some code here to floating the player on the water
case 1: //Ocean Water
case 2: //River Water
case 3: //Stagnant Water
case 4: //Lava
%obj.setDamageDt(%this, $DamageLava, "Lava");
case 5: //Hot Lava
%obj.setDamageDt(%this, $DamageHotLava, "Lava");
case 6: //Crusty Lava
%obj.setDamageDt(%this, $DamageCrustyLava, "Lava");
case 7: //Quick Sand
}
}About the author