|Name of gadget||Health Manager|
|Section||Movers & Outputs|
|Number of Tweak pages||2|
|Last updated||02 Mar 2019 [Beta]|
This gadget houses a value that you can use for the health of an object. The health of an object can be reduced or increased and can be used to show damage or determine if an object should be destroyed or a character killed or injured.
It’s a good idea to use a health manager for any player character or enemy that can take damage. Even though you may be able to achieve what you need with a counter, for example, the health manager (used with the health modifier) gives the advantage that creations shared within the Dreamiverse can all share their damage systems, theoretically allowing you to stamp a weapon and a puppet from completely different places and for them to still work together.
Example Tutorial (adapted from Media Molecule)
See Health Modifier
Click on arrows to reveal
Tweak Menu 1: Properties
- Menu page indicator
- Max Health
Use this to determine the maximum health for the target object. It will prevent the health exceeding this level and effectively limits the Current Health setting.
- Current Health
Use this to determine or read the current health of the target object. Any attempt to set this to a value above the Max Health will be limited to the Max Health. Similarly, this cannot go below zero.
- Cooldown Time
In some games, when a target object (usually the player) takes damage, they get a grace period of invulnerability before they can receive damage again (to allow them time to get away from the source of pain). This brief window of invulnerability is the “Cooldown Time” here and can be set to any value in seconds. You may not want any grace period at all, in which case simply set this to 0.0s.
- Consider Players
By default, the Health Manager doesn’t care which of your fellow players inflicted damage on you (or healed you), but if you activate this option some of the outputs will include player information to indicate who did what to whom.
This is where you turn the gadget on/off.
Tweak Menu 2: Inputs & Outputs
- Menu page indicator
- Affected Object(s)
By default, the gadget applies to the object that it is snapped to, but you can wire this input to one or more objects instead and they will be the ones affected by it. This is important for when an object with a health manager comes into contact with a health modifier’s zone of action.
- Remaining Health
This ouputs the current health of the affected object as a percentage of the maximum. This would be useful in scenarios where you want a character’s physical appearance (afflicted with injuries) to be based on what proportion of health is left rather than the Health Value itself – if two characters had a current health of 80, for example, one with a maximum level of 400 should look more injured than one with maximum 100.
- Currently Gaining Health
This outputs a signal for as long as the targeted object’s health level is increasing. You might use this for a generic effect, such as giving the player a light glow whenever they are being healed.
- Currently Losing Health
This outputs a signal for as long as the targeted object’s health level is decreasing. You might use this for a generic effect, such as giving the target a red tint while it is being damaged.
- No Health
This output provides a signal as long as the Current Health is set to zero. This is typically used to trigger death animations and the like. You could just check the Current Health value with a calculator gadget (health = 0?), but it’s such a common thing to check that the gadget provides a built-in output for convenience.
- Reset Health
Any input to this port will cause the health gadget’s Current Health to be reset to Max Health. Typically used to give the player a top up when they reach checkpoints or stop at an inn in an RPG.
This is where you turn the gadget on/off