Health regeneration question?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: Health regeneration question?

Post by DoomRater »

Health regen in DECORATE may not be considered optimal, but it is possible. I guess it depends if you're making a brand new set of weapons to go along with a player class or not. If not, the ACS script will more than do what you need.

On the other hand, if an item that could execute commands in parallel with the player class as long as it was held in the player's inventory, that would be a better solution. I remember someone doing some sort of experimental build concerning this...
User avatar
lzvk25
Posts: 86
Joined: Thu Oct 07, 2004 10:18 pm
Location: Collierville, TN

Re: Health regeneration question?

Post by lzvk25 »

Something a little bit better :

Code: Select all

script 975 ENTER
{
   int SanteMax = 200;
   int SanteActuelle;
   int SanteDonnee;

   while (CheckInventory("Health") > 0)
   {
      // Regeneration instantanée
      SanteActuelle = CheckInventory("Health");

      if (SanteActuelle < 200 )
      {
         SanteDonnee = SanteMax - SanteActuelle + 1;
         GiveInventory("Health", SanteDonnee);
         /* Print(s:"Sante Actuelle : ", d:SanteActuelle); */
         delay(10);
         /* Print(s:"Sante Donnee   : ", d:SanteDonnee); */
      }

      delay(1);
   }

   delay(10);
   restart;
}
BTW : Santé means Health, SanteActuelle means actual health, SanteDonnee means given health and instantanée means instant in french. I like to use my variables in french so they won't stumble with reserved words.
:wink:
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Health regeneration question?

Post by Gez »

There are people who speak French in Tennessee? :shock: :wink:

Though I'd suggest "vie" instead of "santé" so that it doesn't miss its accent.
Locked

Return to “Editing (Archive)”