|Rings as Health Details »»|
The old ringhealth.lua has been included for legacy purposes.
How it works
This concept is very simple; your rings instead become your health. When shot, you lose rings. To compensate, all shields will instead give you 25 rings. In addition, you begin with 25 rings (or, 26 health)
The damage table is as follows:
When you do damage, you get points equivalent to the damage you've dealt. Killing a player awards a 100-point bonus.
If you are in your super form, you can hurt players when you touch them, and take half the damage you normally would. Rails still take out a quarter of your health, so be careful.
While you can have as many as 9999 rings, ring-hoarding is both a safety and a liability, as having a lot of rings can result in an opponent scoring a large number of points off of you with a rail.
As of 1.1, you may also include your own damage values.
To input an entry to the table, you call the globalized function G_AddToDamageTable.
ringhealth.G_AddToDamageTable(fixed_t knockback, string killmsg, function logic, [boolean swapnames])
knockback: This tells the script how much to kick the player if they get shot by this weapon.
killmsg: Should include two %s variables. The first one is replaced by the attacker, the second one is replaced by the victim. If swapnames is true, this will switch these two variables around.
logic: This is a function you supply to the script to check for the projectile or damage you want to add to the table. It will need to accept a mobj_t and an integer, for the hazardous mobj and the damaged player's health, respectively. Your function then returns the damage value output. If the logic comes out false, return 0.
swapnames: This swaps the player's names in the death message, in case you want the victim's name first. This parameter is optional.
function G_BigBomb (mobj, victimhealth) if mobj.type == MT_BIGFATREALLYREALLYBIGBOMB return 100 else return 0 end end ringhealth.G_AddToDamageTable(64*FRACUNIT, "Wow, %s really DID have a Honkey-Donkey Super-Sonic Big Fat Really Really Big bomb, %s!", G_BigBomb)
rh_knockback <on/off> will determine if players take knockback from being shot. By default, this is on.
rh_friendlypushing <on/off> will determine if players on the same team can kick each other around. By default, this is on.
rh_debug <on/off> will allow you to see what entries in the damage table are activating, and how much damage they do. This will also disable any damage taken from shots to allow you to use players as test dummies. By default, this is off.
painsound <number/sfx_name> allows you to set the sound your character plays when getting hurt. By default, this is set to 5, the first pain sound. It can be one of the following:
/me FLEX ᕦ(◉ᴥ◉)ᕥ
I like this a lot, after I got to try it out in a fairly large netgame. Makes me realize how many of Match's problems are simply from the wacko Sonic health system; you don't feel like you're being robbed of your weapons every second!
Blowing up Area 51 isn't going to destroy Google. You can quote me on that. -Ross Scott
Mustard | THZ Discord | Avatar Credit
I'm going to have to add in the following things:
Last edited by Blaze The Cat; 02-22-2017 at 01:56 PM.