Rune Central

The Official Rune Quake Message Board
It is currently Fri Dec 15, 2017 7:32 pm

All times are UTC - 5 hours [ DST ]




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

Joined: Mon Jan 12, 2009 12:07 am
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 10:29 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: rune of conversion
PostPosted: Mon Jan 12, 2009 9:01 pm 
Offline

Joined: Mon Jan 12, 2009 12:07 am
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  
Reply with quote  
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 9:02 am 
Offline

Joined: Mon Jan 12, 2009 12:07 am
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  
Reply with quote  
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 2:46 pm 
Offline
zop.runequake.com
User avatar

Joined: Fri May 02, 2003 8:46 am
Posts: 321
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  
Reply with quote  
 Post subject: Re: rune of conversion
PostPosted: Tue Jan 13, 2009 11:23 pm 
Offline

Joined: Mon Jan 12, 2009 12:07 am
Posts: 4
well, true. ;)


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users 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:  
cron
Powered by phpBB® Forum Software © phpBB Group