Game Creator
  • Welcome to Game Creator!
  • Quickstart
    • Get Started
    • Setup
    • Tutorials
  • Game Creator
    • Game Creator
      • Actions
      • Conditions
      • Triggers
      • Hotspots
      • Characters
        • Player
        • Markers
        • Gestures
        • States
        • Advanced
          • IK in custom Animations
      • Camera
        • Camera Motors
      • Variables
        • Global Variables
        • Local Variables
        • List Variables
    • Systems
      • Localization
      • Event System
      • Timeline
      • UI
      • Module Manager
      • Game Creator Toolbar
      • Pool System
      • Game Creator API
        • Custom Actions
        • Custom Conditions
        • Custom Triggers
        • Custom Hooks
        • Custom Save & Load
        • Variables Access
        • Custom Module
  • Dialogue
    • Dialogue
      • Anatomy
      • Actors
      • Dialogue UI
      • API
  • Inventory
    • Inventory
      • Inventory Window
        • Catalogue
        • Recipes
        • Types
        • Settings
      • Merchants
      • Containers
      • Loot Tables
      • Equip Items
      • Actions
      • Conditions
      • Custom Inventory UI
  • Quests
    • Quests
      • Quests Overview
      • Create Quests
      • Quests UI
        • Custom UI
  • Stats
    • Stats
      • Stats Overview
        • Stat
        • Attributes
        • Status Effects
        • Formulas
        • Stat Modifiers
      • Stats UI
      • Common Use Cases
        • Simple Health Bar
        • Regenerative Mana
        • Poison Status Effect
        • Levels and XP
        • Strength and Armor
        • Lockpicking
  • Behavior
    • Behavior
      • Behavior Graph
        • Nodes
        • Blackboard
      • Perception
  • Shooter
    • Shooter
      • Weapons
      • Ammunition
      • Interaction
      • Examples
        • Example 1 - Get Started
        • Example 2 - Pick Weapons
        • Example 3 - Top Down
        • Example 4 - Side Scroll
        • Example 5 - First Person
        • Example 6 - Combat
      • Advanced
        • Custom Crosshairs
        • Shooter API
  • Melee
    • Melee
      • Weapons
        • Blade Component
      • Shields
      • Melee Clips
      • Combat
  • Traversal
    • Traversal
      • Obstacles
      • Climbables
      • Built-in Elements
  • Annex
    • Roadmap
    • FAQ
Powered by GitBook
On this page
  • On Start
  • While Active
  • On End
  • Saving and Loading

Was this helpful?

  1. Stats
  2. Stats
  3. Stats Overview

Status Effects

BE CAREFUL WITH THAT...! ... Never mind, I'll be poisoned for the next 3 minutes...

PreviousAttributesNextFormulas

Last updated 6 years ago

Was this helpful?

Status Effects are temporary effects that happen to a character or game object with a Stats component. These effects can either be positive to the affected (buff) or have negative effects (debuff).

An example of a common Status Effect is Poison, which drains health from the player for as long as it is active.

Status Effects have some common properties, such as a localizable name, a description, an icon and a color. These properties can be used in the .

The most important part are the Actions they invoke. There are three of them:

On Start

These Actions are executed as soon as the Status Effect starts and is intended to be used to initialize the effects of the status.

For example, if a Status Effect increases the strength of the bearer, the Action executed On Start should be adding a Stat Modifier to the Invoker object.

While Active

These Actions have a very special behavior. Once they are finished they are called again until the Status Effect is worn off.

For example, the Status Effect Poison, which drains health from the invoker should have two Actions:

  • Decrease 5 points from the invoker's health attribute

  • Wait 0.25 seconds

In order to maximize performance you should add a Wait Action at the beginning or the end of these Actions, so they are not invoked every frame.

On End

These Actions are executed as soon as the Status Effect is worn off and should be used to restore the previous state of the affected object.

For example, following the example of the On Start, where the character's strength is increased by 10 points, On End should remove the Stat Modifier that increases 10 points.

Saving and Loading

It is worth noting that when a game is saved through the Save/Load system, the current Status Effects applied to the different objects are also saved.

When restoring a previously saved game, the On Start actions will be called for each Status Effect that was in effect when the game was saved. The remaining time of each Status Effect will also be the same as the one when the game was saved.

Example: the Player has been infected with the Poison Status Effect, which has a duration of 30 seconds. The user saves the game 12 seconds after the player was afflicted and exists the game.

The next day, when the user loads the game, the player will be infected with the Poison Status Effect (the On Start actions will be called) and the remaining time will be 30 - 12 = 18 seconds.

Stats UI