ORK 4 RPG Framework Logo
  • ORK 4 GUIDE
    • Documentation
    • Tutorials
    • Extensions
    • API
  • ORK 3 GUIDE
    • Documentation
    • Tutorials
    • API
  • Support
  • Forum
  • Get ORK

ORK 4 Documentation

  • Getting Started
    • Welcome
    • First Steps (Unity)
  • Features
    • The Status System
    • Schematics
    • Schematic Nodes
    • Dialogue Importer
    • Variables
    • Selected Data
  • Components
    • Battle Components
    • Combatant Components
    • Control Components
    • Cursor Prefab Components
    • Game Starters
    • Interactable Components
    • Move AI Components
    • Scene Setup Components
  • Editor
    • The ORK 4 Editor
    • Sections & Sub-Sections
    • Node Editor
    • Schematic Editor
    • Asset Sources
    • Unity Overlay Toolbar
  • Section: System
    • System Settings
    • Languages
    • Organizer Types
    • Game States & Conditions
    • General Condition Templates
    • Object Pools
    • Prefab Savers
    • Scene Connections
  • Section: Controls
    • Game Controls
    • Interaction Settings
    • Player Controls
    • Camera Controls
    • Input Keys
    • Control Maps
    • Camera Positions
    • Battle Camera
  • Section: Gameplay
    • Game Settings
    • Formulas
    • Difficulties
    • Shortcut Slots & Settings
    • Custom Settings & Global Custom Settings
    • Global Machines
    • Machine Templates
  • Section: Status
    • Status Values
    • Status Effects
    • Attack Modifiers
    • Defence Modifiers
    • Abilities & Ability Developments
    • Status Developments
    • Research Trees
    • Damage Types
    • Status Bonuses & Templates
    • Status Condition Templates
  • Section: Inventory
    • Inventory Settings
    • Inventory Containers
    • Currencies
    • Items
    • AI Rulesets
    • Crafting Recipes
    • Equipment Slots & Slot Set Templates
    • Equipment & Available Equipment Templates
    • Shops
    • Loot
  • Section: Combatants
    • Combatants
    • Combatant Groups
    • Class Slots
    • Classes
    • Factions & Faction Benefits
    • Animations
    • Move AIs
    • Formations
    • Action Combos
  • Section: Battles
    • Battle Systems
    • Turn Based Battles
    • Active Time Battles
    • Real Time Battles
    • Phase Battles
    • Battle Spots
    • Battle AIs
    • Battle Actions Settings
    • Special Commands Settings
    • Target Settings
    • Target Selection Templates
    • Battle Range Templates
    • Battle Grid Settings
    • Battle Grid Highlights
    • Battle Grid Cell Types
    • Battle Grid Formations
  • Section: Content
    • Content Types
    • Music
    • Sound Templates
    • Areas
    • Teleports
    • Quests & Quest Tasks
    • Logs & Log Texts
    • Object Contents
  • Section: UI
    • UI Settings
    • UI Layers
    • UI Layouts
    • UI Boxes
    • HUDs
    • Notifications
    • Cursor Settings
  • Section: Menus
    • Start Menu
    • Save Game Settings
    • Option Categories
    • Menu Screens
    • Menu Requirements
    • Battle Menus
    • Loot Dialogues
    • Item Collection
    • Combatant Selections
    • Quantity Selections
    • Shop Layouts
  • Section: Texts
    • Text Settings
    • Formatting Settings
    • Flying Texts
    • Use Cost Display
    • Status Preview Display
    • Bonus Display
    • Status Change Display
    • Console Settings & Console Types
    • Text Codes
  • Sections: Editor
    • Editor Settings
    • Backups
    • Variables
    • Plugins
  • Scripting
    • Access Handler
    • Custom Nodes
    • Custom Save Data
    • Custom Component Save Data

ORK 4 Tutorials

  • ORK 4 Unity Quickstart Tutorials (3D)
    • ORK 4 Unity Quickstart 3D
    • 01 Initial ORK Setup
    • 02 Player Setup
    • 03 Music & Scenes
    • 04 UI System Setup
    • 05 UI Boxes
    • 06 Flying Texts
    • 07 Status Values
    • 08 Status Effects
    • 09 First Abilities
    • 10 Fighter Setup
    • 11 First Enemies & Battle AI
    • 12 Battle System Setup
    • 13 Animating Battle Start and End
    • 14 Random Battles
    • 15 Animating Actions
    • 16 Player Battle HUD
    • 17 Elemental Attacks
    • 18 Animating More Actions
    • 19 Inventory & Loot
    • 20 Equipment
    • 21 Loot, Start Equipment & Viewers
    • 22 Magic Abilities
    • 23 Caster Setup
    • 24 More Enemies
    • 25 Start Menu & Save Games
    • 26 Menu Screens
    • 27 Interactions
    • 28 Item Collectors
    • Quickstart Extended
  • Battle Tutorials
    • Active Time Battles
    • Phase Battles
    • Real TT 01 Real Time Battles & Tab Targeting
    • Real TT 02 Control Map, Use Ranges & Battle Area
    • Real TT 03 Camera Control, Battle AI & Reuse Time
    • Real TT 04 Damage Detection, Action Animation & Player HUD
    • Real TT 05 Switch Player & Final Adjustments
    • Hit & Miss
    • Critical Hits
    • Cast Time
    • Reuse Time
    • Grid 01: Battle Grid Setup
    • Grid 02: Highlights
    • Grid 03: Cell Types
    • Grid 04: Move Command
    • Grid 05: Scene Grid Setup
    • Grid 06: Battle Ready
    • Grid 07 Use & Affect Ranges
    • Grid 08: Better Camera Control
  • Gameplay Tutorials
    • Multiple Interaction Controllers
    • Player Group Spawn & Follow
    • Spawn Hunting Enemies
    • Gamepad Controls (Unity Input System)
    • Combined Inputs
    • Control Map for Keyboard (Shortcuts)
    • Control Map for Gamepad (Shortcuts)
    • Quests 01: Menu Screen
    • Quests 02: Hunting
    • Quests 03: Collect Potion Materials
    • Quests 04: Collect Equipment Materials
    • Quests 05: Quest Mark HUDs
    • Crafting 01: Menu Screen
    • Crafting 02: Materials & Recipes
    • Crafting 03: Getting Materials
    • Crafting 04: Proficiency & Critical Outcome
    • Shop
    • Inventory Containers
  • Schematics Tutorials
    • UI Animation Schematics
    • Flying Text Animation Schematics
    • HUD Conditional Schematics
  • UI Tutorials
    • Unity UI: Initial Setup
    • Unity UI: Status Value UI Setup
    • Unity UI: Status Effect UI Setup
    • Unity UI: Shortcut UI Setup
    • Unity UI: Dragging Notification
    • Unity UI: Interaction HUD
    • Unity UI: Shortcut HUD
    • Unity UI: Turn Order HUD
    • Unity UI: Cast Time HUD
    • Unity UI: Quest HUD
    • Unity UI: Tooltip HUD
    • Unity UI: Move Range HUD
    • Menus 01 UI Box Setup
    • Menus 02 Template HUDs
    • Menus 03 Menu Setup
    • Menus 04 Main Menu
    • Menus 05 Inventory
    • Menus 06 Equipment
    • Menus 07 Ability
    • Menus 08 Group
    • Menus 09 Quest
    • Menus 10 Crafting
  • Module 01: Status System
    • Introduction to Modular Tutorials
    • M01.1: Status Values
      • Introduction to Status Values
      • Health
      • Mana
      • Barrier
      • Base Experience
      • Class Experience
      • Spendable Experience
      • Normal Stats
    • M01.2: Modifiers
      • Introduction to Modifiers
      • Element
      • Attack Type
      • Size
      • Race
    • M01.3: Status Effects
      • Introduction to Status Effects
      • Buffs
      • Debuffs
      • Poison
      • Regeneration
      • Blind
      • Stun
      • Sleep
      • Silence
      • Enchants
      • Charm
      • Doom
      • Reflect
  • Module 02: Actions
    • Introduction to Actions
    • M02.1: Formulas
      • Introduction to Formulas
      • Physical Damage Formula
      • Magical Damage Formula
      • Hit Chance
      • Critical Chance
    • M02.2: Abilities
      • Introduction to Abilities
      • Base Attack
      • Elemental Magic Spells
      • Steal Ability
      • Drain
      • Healing Spell
      • Cure
      • Buff Abilities
      • Debuff Abilities

ORK 4 Extensions

  • Plugins
    • Save Game Compression Plugin
  • Schematic Nodes
    • Footstepper Nodes (Unity)
  • Scripts
    • A* Pathfinding Movement Component (Unity)
    • PolyNav 2D Movement Component (Unity)
    • Cinemachine Camera Control Type (Unity)
    • Rewired Input Key (Unity)
    • Unity Legacy Input Key (Unity)
    • Core GameKit Wrapper (Unity)
    • Pool Boss Wrapper (Unity)
View Categories
  • Guide
  • ORK 4
  • ORK 4 Documentation
  • Section: System

Game States & Conditions

0:00 / 4:28
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)

Set up game states for your game.

Game states are found in System > Game States.

Game state condition templates are found in System > Game State Condition Templates.

Game states are an easy way to keep track of what’s currently happening in your game. A game state is either Active or Inactive, the game can have multiple active states at the same time. They’re used for checking conditions, e.g. when to display a HUD or block a machine from executing.

E.g. if the Game Paused state is active you’d most likely want to hide some HUDs and block machines handling custom control mechanics.

Changing Game States #

Game states can be changed by schematics (using a Change Game State node) or automatically through certain events or other game states being activated or inactivated.

Auto Activate/Inactivate #

A game state can be automatically activated or inactivated by the following events:

  • Battle End
    When a battle ends.
  • Battle Start
    When a battle starts.
  • Block Camera Control
    When the camera control is blocked.
  • Block Player Control
    When the player control is blocked.
  • End Blocking Machine
    When ending a ‘Blocking’ execution type machine.
  • End Scene Change
    When ending a scene change (after fading in).
  • Item Collection End
    When an item collection ends (via ‘Item Collector’ component).
  • Item Collection Start
    When an item collection starts (via ‘Item Collector’ component).
  • Menu Close
    When a menu is closed.
  • Menu Open
    When a menu is opened.
  • Pause Game
    When the game is paused.
  • Performing Action End
    When a battle action ends performing (no active action afterwards).
  • Performing Action Start
    When a battle action starts performing (previously no active action).
  • Shop Close
    When a shop is closed.
  • Shop Open
    When a shop is opened.
  • Start Blocking Machine
    When starting a ‘Blocking’ execution type machine.
  • Start Game
    When the game is started (‘Start Game’ node).
  • Start Scene Change
    When starting a scene change (before fading out).
  • Stop Game
    When the game is stopped (‘Stop Game’ node).
  • Target Selection End
    When player group member ends selecting targets.
  • Target Selection Start
    When player group member starts selecting targets.
  • Unblock Camera Control
    When the camera control is unblocked.
  • Unblock Player Control
    When the player control is unblocked.
  • Unpause Game
    When the game is unpaused/resumed.

The events can be added in the game state’s settings.

You can also create custom events by deriving your class from the BaseGameStateChangeType class. Check the classes for the available events for examples.

Examples #

The game state Game Running is auto activated by the event Start Game and auto inactivated by the event Stop Game.

While the player is playing the game (e.g. started through a main menu), the Game Running state will be active and can be used to display HUDs.

The game state In Control is auto activated by the event Unblock Player Control and auto inactivated by the event Block Player Control.

The machine handling player control (e.g. a tick machine) and all interaction machines will only start if the In Control state is active. The game can only be controlled while the player controls aren’t blocked.

Changing by other Game States #

You can add game states that will be changed when a game state is activated and inactivated in the game state’s settings.

Game State Conditions #

The current state of game states can be checked by Game State Conditions.

Checking Conditions #

Game state conditions can check multiple conditions. Either all or only one of the check conditions must be valid for the game state condition to be valid.

A single condition can check:

  • Game State
    Checks if a single game state is active or inactive.
  • Conditions
    Checks multiple game states, either all or only one of the game state checks must be valid.
    This can be used to create complex game state conditions.
  • Template
    Checks a game state condition template.

Example #

A game state condition has 2 conditions, one of them must be valid:

  • Condition 1 (Game State)
    Checks if the single game state A is active.
  • Condition 2 (Conditions)
    Checks if the game states B and C are active (i.e. all checks must be valid).

Game states A and C are inactive, game state B is active – the whole condition is invalid.

Game state A is active – the whole condition is valid, game states B and C don’t matter.

Game state A is inactive, B and C are active – the whole condition is valid.

Templates #

Usually, you’ll keep checking the same game state conditions very often in a game. To prevent setting up a condition each time you need it, you can create a Game State Condition Template, that can be used by game state conditions.

Game state condition templates are found in System > Game State Condition Templates.

Table of Contents
  • Changing Game States
    • Auto Activate/Inactivate
      • Examples
    • Changing by other Game States
  • Game State Conditions
    • Checking Conditions
      • Example
    • Templates
Sitemap
  • Showcase
  • ORK 4 Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • ORK 3 Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (75)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (158)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!