Func recharge: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed {{DISPLAYTITLE}}, covered by the hl2 brush template)
(updates)
Line 1: Line 1:
{{hl2 brush|func_recharge}} It's a brush-based version of <code>[[item_suitcharger]]</code>.
{{lang|Func recharge}}
{{hl2 brush|func_recharge}} It's a brush-based version of {{ent|item_suitcharger}}.


==Dedicated Console Variables==
{{stray ent|{{portal}} {{portal2}}}}
;sk_suitcharger <[[int]]>
: Amount of healing points.(Default: 75 for HL2,30 for HL2:DM)


;sk_suitcharger_citadel <[[int]]>
{{code class|CRecharge|func_recharge.cpp}}
: Changes the total charge of suit points of the citadel charger (Default: 500 for HL2, 200 for HL2:DM.)


;sk_suitcharger_citadel_maxarmor <[[int]]>
==ConVars/Commands==
: Changes the amount of Suit points you can hold when recharging with a citadel charger (Default: 200).  
{{varcom|start}}
{{varcom|sk_suitcharger|75 (HL2) 30 (HL2DM)|Arbitrary number|Amount of power a normal charger may give.}}
{{varcom|sk_suitcharger_citadel|500 (HL2) 200 (HL2DM)|Arbitrary number|Amount of power a citadel charger may give.}}
{{varcom|sk_suitcharger_citadel_maxarmor|200|Arbitrary number|Amount of power the suit can be charged to via a citadel charger.}}
{{varcom|end}}


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV visiblebrush}}
{{KV Parentname}}
{{KV BaseEntity|brush=1|l4d2=1}}
{{KV Origin}}
{{KV|_minlight|float|Defines the minimum light level.}}


==Flags==
==Flags==
* 8192 : Citadel recharger
*8192: Citadel recharger


==Inputs==
==Inputs==
{{I Targetname}}
{{IO|Recharge|Sets charge to maximum.}}
{{I Parentname}}
{{IO|SetCharge|deprecated=1|param=int|Not present in code. Sets the remaining charge in the charger to whatever value you specify.}}
{{IO|Recharge|Sets charge to maximum }}
{{I visiblebrush}}
{{IO|SetCharge|This sets the remaining charge in the charger to whatever value you specify.}}  
{{I BaseEntity}}


==Outputs==
==Outputs==
{{O Targetname}}
{{IO|OutRemainingCharge|Fires once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power. {{outadd|the amount of charge remaining in the charger}}}}
{{IO|OutRemainingCharge|Fires once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power.}}
{{IO|OnHalfEmpty|Fires when the "charge left" reaches 50% of its max.}}
{{IO|OnHalfEmpty|Executed when the "charge left" reaches 50% of its max.}}
{{IO|OnEmpty|Fires when the charger is empty.}}
{{IO|OnEmpty|Executed when the Charger is empty.}}
{{IO|OnFull|Fires when the charger gets recharged to the max.}}
{{IO|OnFull|Executed when player gets recharged to the max.}}
{{IO|OnPlayerUse|Fires when a player {{ent|+use}}s the entity.}}
{{IO|OnPlayerUse|Executed when a player uses the entity (Def. E).}}
{{O BaseEntity}}


==See Also==
==See Also==
*<code>[[func_healthcharger]]</code>, a version of this entity meant for health.
*{{ent|func_healthcharger}}, a version of this entity meant for health.
 
[[Category:Entities]][[Category:Brush Entities]]

Revision as of 14:42, 4 October 2018

English (en)Translate (Translate)

Template:Hl2 brush It's a brush-based version of item_suitcharger.

Note.pngNote:This entity is also in the code for Portal Portal 2. Its functionality is not guaranteed.


C++ In code, it is represented by theCRechargeclass, defined in thefunc_recharge.cppfile.

ConVars/Commands

Cvar/Command Parameters or default value Descriptor Effect
sk_suitcharger 75 (HL2) 30 (HL2DM) Arbitrary number Amount of power a normal charger may give.
sk_suitcharger_citadel 500 (HL2) 200 (HL2DM) Arbitrary number Amount of power a citadel charger may give.
sk_suitcharger_citadel_maxarmor 200 Arbitrary number Amount of power the suit can be charged to via a citadel charger.

Keyvalues

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.


Flags

  • 8192: Citadel recharger

Inputs

Recharge
Sets charge to maximum.
SetCharge <integerRedirectInput/integer> Obsolete
Deprecated.
Not present in code. Sets the remaining charge in the charger to whatever value you specify.
SetDamageFilter <targetnameRedirectInput/string>
Sets a filter for this entity for when it receives damage.
EnableDamageForces
Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces
Prevents the entity from being pushed by damage done to it.
Todo: move/mention at proper place


Outputs

OutRemainingCharge
Fires once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power. This output automatically puts the amount of charge remaining in the charger into the parameter box for inputs, if the mapper does not override the parameter with something else.
OnHalfEmpty
Fires when the "charge left" reaches 50% of its max.
OnEmpty
Fires when the charger is empty.
OnFull
Fires when the charger gets recharged to the max.
OnPlayerUse
Fires when a player +uses the entity.


See Also