Rune Central http://forums.runequake.com/ |
|
rune of conversion http://forums.runequake.com/viewtopic.php?f=2&t=1514 |
Page 1 of 1 |
Author: | keres [ Mon Jan 12, 2009 8:14 pm ] |
Post subject: | rune of conversion |
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 |
Author: | keres [ Mon Jan 12, 2009 9:01 pm ] |
Post subject: | Re: rune of conversion |
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. |
Author: | keres [ Tue Jan 13, 2009 9:02 am ] |
Post subject: | Re: rune of conversion |
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? |
Author: | Zop [ Tue Jan 13, 2009 2:46 pm ] |
Post subject: | Re: rune of conversion |
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. |
Author: | keres [ Tue Jan 13, 2009 11:23 pm ] |
Post subject: | Re: rune of conversion |
well, true. |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |