Blockland Forums > Modification Help

Items that restore health and ammunition on pick up?

Pages: << < (2/2)

Demian:

Is there a way to determine the playertype of the player who picks up the item? Since the amount of health gained (Not percentage, fixed value) depends on the item type (Small, medium, large) and the playertype. I intend to make this combatible with my TF2 playertypes, so I can add special values to the playertypes themselves. (Like smallHealAmount = 50, mediumHealAmount = 100 and so on.)

Also the regained health should not go over the max health of the playertype.


--- Quote from: Space Guy on March 23, 2011, 02:59:56 PM ---The TF2 HP/ammo packs do percentages rather than fixed amounts so Iban's is fine. You may want to just make the item invisible for a few seconds rather than delete it entirely for static health pickups, though - check if it's a dropped one (Candy Cane/Medieval do this) or placed one first.

--- End quote ---
The idea is that the item respawns after 10 seconds after it has been picked up.


--- Quote from: Chrono on March 24, 2011, 05:22:59 PM ---Playertypes usually have 100 health anyways.

--- End quote ---
Not with my TF2 playertypes.

Edit: Upon further inspection, they do percentages. Small 20%, medium 50% and large 100%. So I need three types of health kits.
Edit2: Tested the script, the item goes to my inventory. It should not do that.

Iban:

Did you even read the script? You need to give the item a property.

Demian:


--- Quote from: Iban on March 25, 2011, 09:53:17 AM ---Did you even read the script? You need to give the item a property.

--- End quote ---
Did I mention I am not a scripter? I do not know what you mean by a property or how to assign one.

Pages: << < (2/2)

Go to full version