Rune Central

The Official Rune Quake Message Board
It is currently Thu Nov 29, 2012 10:56 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: rune of conversion
PostPosted: Mon Jan 12, 2009 7:14 pm 
Offline

Joined: Sun Jan 11, 2009 11:07 pm
Posts: 4
i wrote a small conversion function that converts any health over 100 into armor, and any armor over 100 into health in integers of 5 (until they both reach 100).
it is quite simple, and balancing for a rune imo.
Code:
void() k_ConvertHealthArmor =
{
   local float SwapAmount
   if (self.health > 100 && self.armorvalue < 100)
   {
      SwapAmount = self.health - 100;
      if (SwapAmount > 5) SwapAmount = 5;
      self.armorvalue = self.armorvalue + SwapAmount;
      self.health= self.health - SwapAmount;
   }
   if (self.health < 100 && self.armorvalue > 100)
   {
      SwapAmount = self.armorvalue - 100;
      if (SwapAmount > 5) SwapAmount = 5;
      self.health = self.health + SwapAmount;
      self.armorvalue = self.armorvalue - SwapAmount;
   }
};


i don't know. just something fun :)

***EDITED***
2nd version
extra special super thanks to TwentySeven


Last edited by keres on Mon Jan 12, 2009 9:29 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: rune of conversion
PostPosted: Mon Jan 12, 2009 8:01 pm 
Offline

Joined: Sun Jan 11, 2009 11:07 pm
Posts: 4
also, it is called in client.qc as
Code:
   if (self.WaitValue <= time)
   {
      self.WaitValue = time + 1;
      k_ConvertHealthArmor();
   }


so it is only called 1 frame per second.


Top
 Profile  
 
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 8:02 am 
Offline

Joined: Sun Jan 11, 2009 11:07 pm
Posts: 4
hmm.
actually i was wondering. maybe instead of this, the rune sets your max health to 200 and converts armor into health until it reaches 200. ;)

and maybe you get 100 health for picking it up?
how bout 100 armor, so it converts it over time?


Top
 Profile  
 
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 1:46 pm 
Offline
zop.runequake.com
User avatar

Joined: Fri May 02, 2003 7:46 am
Posts: 230
Location: Palm Desert, CA
I don't really want to rain on your parade, but unless the armor protects at 100% (red armor is 80%), it will be detrimental to convert health into armor. It can be possible that the health a player would lose from megahealth rot would be better placed into armor, but not during a fight.

You don't need to worry about calling a rune function in client.qc, RuneQuake has a function for runes that have repeating effect. (Rune_Think in runeserv.qc).

Converting ammo into health may be useful. There's usually tons of ammo in play, so it would definately not be a 1:1 conversion to health, even for cells or rockets.

_________________
a random mod server: zop.runequake.com


Top
 Profile  
 
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 10:23 pm 
Offline

Joined: Sun Jan 11, 2009 11:07 pm
Posts: 4
well, true. ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group