Logic Gadgets: Health Manager

Icon
Name of gadget Health Manager
Section Movers & Outputs
Number of Tweak pages 2
Author LadylexUK, QuietlyWrong
Last updated 02 Mar 2019 [Beta]

Description

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

Tweak Menus

Click on arrows to reveal

Tweak Menu 1: Properties
  1. Tweak Menu page 1: Properties
  2. Max Health
    2a. Input
    2b. Output
  3. Current Health
    3a. Input
    3b. Output
  4. Cooldown Time
    4a. Input
    4b. Output
  5. Consider Players
    5a. Input
    5b. Output
  6. Power
  1. Menu page indicator
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Power
    This is where you turn the gadget on/off.
Tweak Menu 2: Inputs & Outputs
  1. Tweak Menu Page 2 : Inputs & Outputs
  2. Affected Object(s)
    2a. Input
  3. Remaining Health
    3b. Output
  4. Currently Gaining Health
    4b. Output
  5. Currently Losing Health
    5b. Output
  6. No Health
    6b. Output
  7. Reset Health
    7a. Input
  8. Power
  1. Menu page indicator
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. Power
    This is where you turn the gadget on/off

Lex Tips

Useful Tutorials

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: