Blockland Forums > Suggestions & Requests

Animated HUD.

(1/6) > >>

King Tøny:
I need someone that can animate this HUD for me from the TotalRPG mod.

I already made all the icons for you.

I just need someone that can adjust the HUD when you take damage. So for example

100 =

80 =

50 =

30 =

0 =
I've also included money Icons if you wish to add a script for money values as well.

0 =

1 =

2 =

10 =

100 =

1000 =


--- Quote ---function showHUD(%client)
{
   if(%client.disableHUDUntil > $sim::time || $pref::server::TotalRPG::disableHUD)
      return;

   if(!isObject(%client.player) || %client.player.getDamageState() $= "Disabled")
   {
      %client.bottomPrint($pref::server::TotalRPG::deathMessage);
      return;
   }

   %health = mFloor(%client.player.getDatablock().maxDamage - %client.player.getDamageLevel());
   %mana = %client.player.mana;
   %Coins = %client.score;

   if(%Coins $= "")
      %Coins = 0;

   if(%client.currentSkill !$= "")
   {
      %skillHUD = %client.currentSkill SPC "Level" SPC %client.skillLevel[%client.currentSkill] SPC "(" @ %client.skillEXP[%client.currentSkill] SPC "/" SPC getLevelEXP(%client.skillLevel[%client.currentSkill] + 1) @ ") EXP";
   }
   
   if($totalRPGHUDExtensions > 0)
   {
      for(%i = 1; %i <= $totalRPGHUDExtensions; %i++)
      {
         %extension = $totalRPGHUDExtension[%i];
         
         %method = getField(%extension, 0);
         %target = getField(%extension, 1);
         %value = getField(%extension, 2);
         %name = getField(%extension, 3);
         %args = getField(%extension, 4);
         
         switch$(%target)
         {
            case "player":
               %target = %client.player;
            case "client":
               %target = %client;
            case "minigame":
               %target = %client.minigame;
         }
         
         if(!isObject(%target))
            continue;
         
         if(%method == 1)
         {
            %retrieveValue = %target.getAttribute(%value);
         }
         else if(%method == 2)
         {
            $temp = "";
            $tempC = %target;
            // Someone let me know if there is a better way to do this :/
            eval("$temp = $tempC." @ %value @ "(" @ %args @ ");");
            %retrieveValue = $temp;
         }
         
         %extensionStats = %extensionStats SPC "\c4" @ %name @ ":" SPC %retrieveValue;
      }
   }

   commandToClient(%client, 'bottomPrint', "\c2<bitmap:Add-Ons/server_totalrpg/CI_dinner>:" SPC %health @ (%mana $= "" ? "" : " \c1Mana:" SPC %mana) SPC "\c3" @ $pref::server::TotalRPG::currencyName @ ":" SPC %coins SPC "\c6" @ %skillHUD SPC %extensionStats, false);
}

//downloadable hud

AddDamageType("dinner",   '<bitmap:Add-Ons/server_totalRPG/CI_dinner> %1',    '%2 <bitmap:add-ons/server_totalRPG/CI_dinner> %1',0.5,1);
--- End quote ---





All the relatively  hard work is done for you, the script is done and the icons are made. I just now need someone who is capable to get it to work as I don't know how to script this part.

maxymax13:
chicken-o-meters? heck yeah i support this

SuperMalleo64:
the damage icons remind me of Doom

Soviet Narwhal:

--- Quote from: SuperMalleo64 on October 05, 2018, 05:17:00 PM ---the damage icons remind me of Doom

--- End quote ---

do you only talk about doom and quake bro

King Tøny:

--- Quote from: SuperMalleo64 on October 05, 2018, 05:17:00 PM ---the damage icons remind me of Doom

--- End quote ---

That's kinda the idea, we just need someone to script it in.

Navigation

[0] Message Index

[#] Next page

Go to full version