Regenarating Armor?
Moderator: InsideQC Admins
23 posts
• Page 2 of 2 • 1, 2
metlslime wrote:why regenerate armor instead of health? It would make sense in a game where armor protected 80-100% of damage, but in quake the percentages are rather low, so you end up losing a lot of health even when you do have armor.
So if you do this i recommend making armor absorb close to 100% of damage, and remove most health pickups from the game (maybe just restore health between missions or something.)
Would you care to help me make it so that the armor absorbs all of the damage until it reaches zero, then the health absorbs the damage?
- DusterdooSmock
- Posts: 170
- Joined: Thu Aug 19, 2010 9:58 pm
metlslime wrote:If you look in the function armor_touch, you can see that the different armors set different values for self.armortype. If the armortype is "1.0" then it would absorb 100% of any damage until it runs out.
So, would i set the armor type to "1.0" ?
- DusterdooSmock
- Posts: 170
- Joined: Thu Aug 19, 2010 9:58 pm
Spike wrote:set it to 2 and it'll probably heal you when you take damage!
No, but each armor point would absorb 2 damage points.
To heal-me-on-damage-armor, use a negative factor for .armortype
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Ok, i tried to set self.armorvalue = 100; in PutClientInServer, but when the player spawns, he doesnt spawn with 100 armor, he still spawns with 0.... 
- DusterdooSmock
- Posts: 170
- Joined: Thu Aug 19, 2010 9:58 pm
Have you set .armortype to something different from zero ?
My advice is you to read the armor_touch() function in items.qc. Also, T_Damage () in combat.qc helps to understand the armor absorption algorithm.
My advice is you to read the armor_touch() function in items.qc. Also, T_Damage () in combat.qc helps to understand the armor absorption algorithm.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
23 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest