ORK Framework Logo - RPG Editor for Unity
  • ORK 4 BETA
  • Features
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • 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
    • Adding Active Time Battles
    • Adding Phase Battles
    • Hit & Miss
    • Critical Hits
    • Cast 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
    • 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

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
  • Components

Combatant Components

Learn more about combatant-related components.

Combatant Component #

The Combatant Component is automatically added to the object of a combatant. You’ll never add this component manually.

The component’s settings show information about the combatant (e.g. status values, status effects, equipment, etc.) and allows performing some changes (e.g. changing status values/effects, adding items, etc.).

It’s used as a link between the object and the combatant’s instance, e.g. to allow a combatant to be found based on an object.

Combatant Animation Events Component #

Add this component to the prefab of a combatant to be able to use it’s functions in custom scripts or animation events (Unity).

Has the following functions available:

  • CalculateCurrentAction()
    Calculates the combatant’s current action outcome.
    Same as using a Calculate Action node.
  • CalculateCurrentAction(float damageFactor)
    Calculates the combatant’s current action outcome with the provided damage factor.
    Same as using a Calculate Action node.
  • ActivateDamageDealers()
    Activates all Damage Dealer components on the combatant.
    The damage dealers need to have an action set before activation (e.g. via Set Damage Dealer Action node used in a schematic animating an ability or item).
  • DeactivateDamageDealers()
    Deactivates all Damage Dealer components on the combatant.
  • CurrentActionActivateDamageDealers()
    Activates all Damage Dealer components of the combatant’s current action (have to be set up for auto activation).
  • CurrentActionDeactivateDamageDealers()
    Deactivates all Damage Dealer components of the combatant’s current action (have to be set up for auto activation).

Equipment Viewer Component #

The Equipment Viewer component is used to spawn equipment prefabs on a combatant’s object or change it’s renderer materials.

The equipment viewer will keep track of the equipment of it’s defined equipment slot and spawn it’s viewer prefab (or use the viewer material).

Optionally use conditions to determine if the equipment should be displayed, e.g. only displaying weapons during battles or use different equipment viewers for sheated and drawn weapons.

Add Combatant Component #

Adds a combatant to the object. The object will be used as the combatant instance’s object.

Using the Remember Combatant settings of the component allows to save the combatant’s state, either per scene or globally for all scenes. Otherwise, each time the scene is loaded (or the object instantiated) a new combatant is created.

Combatant Spawner Component #

Spawns combatants in the scene.

The combatants can be spawned at the object’s position, a number of defined objects or at random positions within a defined area.

Defeating combatants of a spawner can cause respawns after a defined time.

Using Scene ID settings of the component allows setting a combatant’s battle state to be finished, blocking spawning again when coming back to the scene.

Using the Remember Combatants settings of the component allows to save the state of the spawned combatants, either per scene or globally for all scenes. Otherwise, each time the scene is loaded (or the object instantiated) new combatants are created.

You can optionally set a Battle component to be used as the place of a battle caused by the spawner’s combatants.

Combatant Despawner Component #

Despawns non-player combatants in the scene, either when being out of range of the player or after a defined time (or both).

The despawner handles all combatants in the scene, e.g. create an empty object and add the Combatant Despawner component to it.

Block Combatant Spawn Component #

Blocks Combatant Spawner components from spawning combatants within the object’s area.

Can also be used if the component’s object or it’s child objects where hit by the raycast finding the spawn position. E.g. add the component at the root of your level’s blocking architecture to prevent combatants from spawing there (game objects still need colliders on them to be able to hit them with the raycast).

Level Zone Component #

Adds a level zone to the scene or a limited area.

Unity: Uses a collider with Is Trigger enabled to define the area.

Level zones can be used by battles, combatant spawners and other combatant creations (e.g. via schematics) to control the levels of newly created combatants.

This is a convenient way to control levels within a scene without having to change level settings of each individual battle or combatant spawner.

Combatant Trigger Component #

Keep track of combatants while they’re within the object’s trigger area Add tags to combatant triggers to define different triggers on a combatant.

Combatant triggers can e.g. be used by the battle AI or move AI to determine targets.

You can use combatant triggers on their own or added to the objects of your combatants (e.g. on their prefab). When they’re added to a combatant, the combatant itself is excluded from being detected by the combatant triggers.

Additionally, combatant triggers also know how long a combatant has been within them – e.g. this can be used to only detect targets for the move AI when they are in the trigger for a defined mount of time.

Tags #

Add tags to combatant triggers to be able to identify different triggers.

E.g. use the tag front for a combatant trigger in the front of the combatant and tag for a trigger in the back of the combatant.

Using Combatant Triggers #

Combatant triggers can be used in different functionality of ORK.

Battle AIs #

The battle AI can select targets that are in the user’s combatant triggers.

You can also check for combatants that are in a combatant trigger for a defined amount of time.

Learn more about the battle AI in this documentation.

Move AIs #

The move AI’s enemy detection can use combatants that are within the user’s combatant triggers.

Optionally this can be limited to combatants that are within the trigger for a defined amount of time.

E.g. immediately detect targets that enter a front combatant trigger, but detect targets in a back trigger only after 2 seconds.

Learn more about the move AIs in this documentation.

Battle Ranges #

Battle ranges are used for use range and affect range target selection in abilities and items.

They can use combatant triggers to select targets, optionally limited to combatants that are within the trigger for a defined amount of time.

E.g. an ability should target all enemies in a 5 world units long area in front of the user.

Set up a combatant trigger for that area and use it’s tag for the battle range.

Learn more about battle ranges in this documentation.

Schematics #

Schematics can check if a combatant is within a combatant trigger (e.g. In Combatant Trigger or Combatant Trigger Time nodes) and use combatants in combatant triggers as selected data (Select Combatant Trigger node).

The schematic nodes can use both combatant triggers added to combatants or set up on their own.

Scripting #

You can also access the combatant triggers of a combatant via scripting:

List<CombatantTriggerComponent> triggers = combatant.Object.Triggers;

The combatant is an instance of the Combatant class, i.e. a combatant in your game.

The Combatant Trigger component has different functions available to get or check combatants within the trigger, check tags, etc.

For using combatant triggers on objects, you can use the regular Unity functionality to get the CombatantTriggerComponent component, e.g.:

CombatantTriggerComponent[] triggers = gameObject.GetComponentsInChildren<CombatantTriggerComponent>();
Table of Contents
  • Combatant Component
  • Combatant Animation Events Component
  • Equipment Viewer Component
  • Add Combatant Component
  • Combatant Spawner Component
  • Combatant Despawner Component
  • Block Combatant Spawn Component
  • Level Zone Component
  • Combatant Trigger Component
    • Tags
    • Using Combatant Triggers
      • Battle AIs
      • Move AIs
      • Battle Ranges
      • Schematics
      • Scripting
Sitemap
  • ORK 4 BETA
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (73)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (156)
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!