ORK Framework Logo - RPG Editor for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

Status System Setup

  • START Status System Setup
  • 01 Status Values
  • 02 Status Development
  • 03 Attack/Defence Modifiers
  • 04 Status Effects
  • 05 Formulas
  • 06 Ability & Item Types
  • 07 Abilities Part 1: Attacks
  • 08 Abilities Part 2: Support & Sabotage
  • 09 Abilities Part 3: Elemental Magic
  • 10 Items
  • 11 Equipment Part 1: Slots & Slot Set Templates
  • 12 Equipment Part 2: Weapons
  • 12.5 (Optional) Equipment Part 2.5: Weapons
  • 13 Equipment Part 3: Shields, Armor & Accessories
  • 13.5 (Optional) Equipment Part 3.5: Shields, Armor & Accessories
  • 14 Equipment Part 4: Available Equipment Templates
  • 15 Loot
  • 16 Battle AIs
  • 17 Combatants Part 1: General Settings
  • 18 Combatants Part 2: Players
  • 19 Combatants Part 3: Enemies
  • 20 Combatant Groups
  • END Status System Setup

3D RPG Playground

  • START 3D RPG Playground
  • 01 Player Setup
  • 02 Start Menu
  • 03 First Interaction
  • 04 Music
  • 05 Areas
  • 06 Collecting Items
  • 07 Displaying Equipment
  • 08 Combatant Prefabs, Icons & Portraits
  • 09 Combatant Animations
  • 10 Camera Positions
  • ANIM 01 Battle Start/End Schematics
  • ANIM 02 Use, Cast & Camera
  • ANIM 03 Abilities & Items
  • ANIM 04 Physical Attacks
  • ANIM 05 Special Actions
  • BATTLE 01 Battle Menu
  • BATTLE 02 Prepare for Battle
  • TURN 01 Turn Based Setup
  • TURN 02 Turn Order HUD
  • ATB 01 Active Time Setup
  • ATB 02 Cast Times
  • ATB 03 Timebar HUD
  • BATTLE 03 The First Battle
  • BATTLE 04 Hunting Move AI
  • BATTLE 05 Spawning Combatants
  • 11 Save Games
  • MENU 01 UI Boxes
  • MENU 02 Template HUDs
  • MENU 03 Overview Menu
  • MENU 04 Menu Screens
  • 12 Shop
  • BATTLE 06 Random Battles
  • DUNGEON 01 Enter the Dungeon
  • DUNGEON 02 The Trapdoor
  • DUNGEON 03 Enemies on Level 1 & 2
  • DUNGEON 04 Traps on Level 3
  • DUNGEON 05 Going Deeper
  • 13 Bestiary (+MENU+ANIM)
  • QUEST 01 Hunting Quests (+MENU)
  • QUEST 02 Guard NPC
  • QUEST 03 Forest Ruin Cheese
  • QUEST 04 Witch NPC with Cheese
  • QUEST 05 Quest Mark HUDs
  • 14 Research Trees (+MENU)
  • CRAFT 01 Crafting Materials
  • CRAFT 02 Crafting Recipes
  • CRAFT 03 Crafting Menu
  • CRAFT 04 Crafting Proficiency & Critical Crafting
  • CRAFT 05 Materials Loot
  • 15 Changing Choice Dialogue
  • 16 Follow Me!
  • BATTLE 07 Sequence Loot Dialogue

3D Action RPG

  • START 3D Action RPG
  • 01 Status System Setup
  • 02 Player Setup
  • 03 Player Weapon
  • 04 Player Attacks
  • 05 Enemy: Chomper
  • 06 Chomper Attack
  • 07 Hit & Death
  • 08 HUDs
  • 09 Rolling on the Floor
  • 10 Enemy: Spitter
  • 11 Spit Attack
  • 12 Potion
  • 13 Grenade
  • 14 Item HUD
  • 15 Enemy: Grenadier
  • 16 Grenadier Melee Attacks
  • 17 Grenadier Flamethrower
  • 18 Item Drops
  • END 3D Action RPG

2D Grid Battle RPG

  • START 2D Grid Battle RPG
  • 01 Player Setup
  • 02 Prefab & Music Setup
  • 03 Randomizing Combatants
  • 04 UI Setup
  • 05 Battle Start, End & Phase Schematics
  • 06 Battle System Setup
  • 07 Battle Grid Setup
  • 08 Grid Move
  • 09 Forest Battle Grid
  • 10 Battle AI
  • 11 Ability Ranges
  • 12 Death & Use Schematics
  • 13 Attack Schematic
  • 14 Shoot Schematics
  • 15 Battle Selection Interaction
  • END 2D Grid Battle RPG

Schematics

  • Simple Start Schematic
  • Battle Start Schematic
  • Battle End Schematic
  • Moving to Target and Back
  • Animating a Base Attack
  • Animating a Magic Ability
  • Grid Movement
  • Open and Close UI Animations
  • Flying Text Mover

UI Setups

  • Unity UI: Initial Setup
  • Unity UI: TextMesh Pro Setup
  • Unity UI: UI Box
  • Unity UI: Flying Text
  • Unity UI: Dragging Notification
  • Unity UI: Interaction HUD
  • Unity UI: Simple Player HUD
  • Unity UI: Quest HUD
  • Unity UI: Shortcuts HUD
  • Unity UI: Currency HUD
  • Unity UI: Tooltip HUD
  • Unity UI: Control HUD
  • Unity UI: Attack Modifiers
  • Unity UI: Defence Modifiers

Gameplay Bits

  • Combining Input Origins
  • Combining Status Value Flying Texts
  • Fun With Flying Text
  • HUD Effects With Conditional Schematics
  • Inventory Containers
  • Multi Interaction Controllers
  • World Space HUD
  • World Space Dialogue
  • Home
  • Guide
  • Tutorials
  • 3D RPG Playground
  • ANIM 01 Battle Start/End Schematics

ANIM 01 Battle Start/End Schematics

Table of Contents
  • Battle Message UI Box
    • UI Box Prefab
      • Rect Transform
      • Image
      • TextMeshPro - Text (UI)
    • New UI Layer
    • UI Box Setup
      • Base Settings
      • Unity UI
      • Override Default Settings > Schematics
    • Game State
  • Battle Start Schematic
    • Settings
      • Actors
    • Store Music
    • Change Music
    • Play Sound (Channel)
    • Show Dialogue
    • Change Camera Position
    • Wait
    • Fade Screen
    • Place At Spots
    • Spawn Battle Combatants
    • Stop Camera Position Fade
    • Initial Camera Position
    • Block Camera Control
    • Camera Control Target
    • Death Animation
    • Change Game State
    • Fade Screen
  • Victory Schematic
    • Settings
    • Change Music
    • Show Dialogue
    • Wait
    • Collect Battle Gains
    • Wait
    • Change Music
    • Fade Screen
    • Destroy Battle Combatants
    • Change Game State
    • Fade Screen
  • Escape Schematic
    • Change Music (1st)
    • Show Dialogue
    • Collect Battle Gains
    • Wait (2nd)
    • Clear Battle Gains
  • Defeat Schematic
    • Show Dialogue
    • Wait
    • Change Music
    • Game Over
  • Game Over Settings
    • ORK Game Settings > Game Over Settings
  • Save Changes

In this tutorial we’ll set up schematics to animate the start and end of our battles.

This tutorial is the start of the sub-series for animating battles.

We’ll set up 4 schematics, one for the battle start (spawning/placing the combatants) and 3 for the different possible battle outcomes – victory, escape and defeat.

Battle Message UI Box #

First, we’ll set up a new UI box to display battle start/end messages. We’ll also add a new UI layer above the screen fader, to have it displayed while fading the screen.

UI Box Prefab #

We’ll create a new prefab from scratch, no scrolling. This time, the box should only display a centered text, no box image, etc.

Use the scene hierarchy context menu to create a basic setup: Makinom > UI Box > UI Box (no title this time)

Rect Transform #

I’m anchoring the box to the top center and have it go accross the whole width of the screen at a height of 100.

Image #

Remove the Image component from the UI Box game object, as we don’t want a background image in the box.

TextMeshPro – Text (UI) #

The text component is located on the UI Box > Text child object.

Increase the Font Size (e.g. I’m using 50) and use the Center alignment.

The finished result should look something like this:

Create a prefab out of the UI Box game object, e.g. name it UI Box Battle Message.

Don’t forget to remove the Canvas in case you created the UI box in one of your game scenes.

New UI Layer #

Open the Makinom editor and navigate to UI > UI Layers, we’ll create a new UI layer.

  • Name
    Set to Above Screen Fader.

The layer is added at the end of the list, i.e. it’ll be placed above all others, including the Screen Fader layer which has the Screen Fader setting enabled.

UI Box Setup #

Navigate to UI > UI Boxes, we’ll add a new UI box for our battle message.

Base Settings #

  • Name
    Set to Battle Message.
  • UI Layer
    Select Above Screen Fader.

Unity UI #

  • UI Box Prefab
    Select UI Box Battle Message.

Override Default Settings > Schematics #

I’m also using the move from left and move to right schematics from the UI animations schematics to animate this UI box.

  • Own Schematics
    Enable this setting.
  • Before Open Schematic
    Select the UIMoveFromLeftFadeIn schematic.
  • Wait
    Enable this setting.
  • Before Close Schematic
    Select the UIMoveToRightFadeOut schematic.
  • Wait
    Enable this setting.

Game State #

We’ll also set up a new game state that we’ll use to have control over when to show the battle HUDs.

Navigate to Game > Game States and add a new game state.

  • Name
    Set to Show Battle HUD.
  • Initial State
    Disable this setting.

That’s it for the UI setup – don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Battle Start Schematic #

Now, we’ll set up the schematic animating our battle start. We’ll use the Battle Intro Zoom camera position to create a zoom-in effect, display a Fight! message and fade the screen. While the screen is faded out, we’ll spawn and place our combatants.

Navigate to Schematics.

Settings #

  • Block Player Control
    Enable this setting
  • Block Camera Control
    Enable this setting.
  • Store Initial Position (Camera Settings)
    Enable this setting.
    We’ll use it to reset the camera after the zoom in, mainly for resetting the field of view.

Actors #

We’ll add 2 actors, one for the battle arena (to use it as camera target) and one to have all combatants that are in battle available (for having dead combatants play their Death animation).

Click on Add Actor

  • Actor Type
    Select Battle Arena.

Click on Add Actor

  • Actor Type
    Select Combatants.
  • Add Player Group
    Enable this setting.
  • In Battle
    Select Yes.

Store Music #

Add Node > Audio > Music > Store Music

We store the currently playing music to be able to resume playing it after the battle (i.e. in a battle end schematic).

The default setup of the node should usually already be what you need. Please note that this depends on which music channel your music is playing.

  • Music Channel
    Set to 0.
  • Store ID
    Set to 0.

Change Music #

Add Node > Audio > Music > Change Music

Now we change the music to our battle music.

  • Music Channel
    Set to 0.
  • Play Type
    Select Fade Out Play.
  • Music Clip
    Select Battle Theme.
  • Fade Time
    Set to 1.
  • Interpolation
    Select Linear.

Play Sound (Channel) #

Add Node > Audio > Audio > Play Sound (Channel)

This node plays a sound on a sound channel instead of a game object in the scene.

  • Audio Clip
    Select Select Audio Clip.
    This’ll let us directly define an audio clip in the node instead of setting one up in the Settings node.
  • Audio Clip Asset
    Select synthetic_explosion_1.
  • Sound Channel
    Set to 0.
  • Wait
    Disable this setting.
  • Play One Shot
    Enable this setting.

Show Dialogue #

Add Node > UI > Dialogue > Show Dialogue

We’ll display the battle message as an Auto Close dialogue.

  • Dialogue Type
    Select Auto Close.
  • UI Box
    Select Battle Message.
  • Block Accept Button
    Enable this setting.
  • Close After
    Set to 2.
  • Wait
    Disable this setting.
  • Text (Message Content)
    Set to: <color=#FF0000FF>Fight!</color>

Change Camera Position #

Add Node > Game Object > Camera > Change Camera Position

Now we’ll zoom in.

  • Camera Position
    Select Battle Intro Zoom.
  • Object (Target Object)
    Select Player.
  • Fade Position
    Enable this setting.
  • Time
    Select Value > Value.
    Set the value to 1.
  • Wait
    Disable this setting.
  • Interpolation
    Select Quadratic > Quadratic In.

Wait #

Add Node > Base > Wait

We’ll wait for a part of the zoom in before fading the screen.

  • Time
    Select Value > Value.
    Set the value to 0.5.

Fade Screen #

Add Node > Animation > Fade > Fade Screen

We’ll fade out the screen to hide our combatant spawning and placement.

  • Wait
    Enable this setting.
  • Time
    Set to 0.5.
  • Interpolation
    Select Linear.
  • Fade Alpha/Red/Green/Blue
    Enable these settings.
  • Start Color
    Set to a white color with no alpha (fully transparen, A=0).
  • End Color
    Set to a white color with full alpha (not transparent, A=1 or 255, based on your color picker).

Place At Spots #

Add Node > Battle > Spawn > Place At Spots

This’ll place the already spawned combatants (e.g. the player) at their battle spots.

  • Place All
    Enable this setting.

Spawn Battle Combatants #

Add Node > Battle > Spawn > Spawn Battle Combatants

This’ll spawn all combatants participating in battle at their battle spots.

  • Spawn All
    Enable this setting.

Stop Camera Position Fade #

Add Node > Game Object > Camera > Stop Camera Position Fade

Stop the camera fading in case it’s still ongoing.

No further settings.

Initial Camera Position #

Add Node > Game Object > Camera > Initial Camera Position

Reset the camera to the initial position (mainly for the field of view).

  • Fade Position
    Disable this setting.

Block Camera Control #

Add Node > Input > Block Camera Control

We’ll unblock the camera control to be able to set the battle arena as the target of the camera.

  • Block/Unblock
    Disable this setting.

Camera Control Target #

Add Node > Game Object > Camera > Camera Control Target

This’ll change the target for the camera control – this is only available for the built-in camera controls or custom controls extending from the BaseCameraControl class.

  • Target Type
    Select Game Object.
  • Object (Target Object)
    Select Actor 0: Battle Arena.

Death Animation #

Add Node > Animation > Combatant > Death Animation

This node plays the animation type set up for death animations (in Base/Control > Animation Types > General Settings) on all dead combatants.

This is used to e.g. have a dead player member show as dead (animated).

  • Object (Combatant Object)
    Select Actor 1: Combatants.

Change Game State #

Add Node > Game > Game > Change Game State

We’ll activate our game states to show the equipment and battle HUDs (which we’ll set up later).

Click on Add Game State.

  • Game State
    Select Show Equipment.
  • Set State
    Select Active.

Copy the Game State Change 0.

  • Game State
    Select Show Battle HUD.

Fade Screen #

Add Node > Animation > Fade > Fade Screen

Copy the previous Fade Screen node, time to fade in the screen again.

Click on the Swap Colors button to exchange the start and end color.

And that’s it for the schematic. Click on Save Schematic to save it, e.g. as BattleStart.

Victory Schematic #

This battle end schematic is used when the player won the battle. We’ll play the victory music, collect our loot and continue on.

Settings #

  • Block Player Control
    Enable this setting
  • Block Camera Control
    Enable this setting.

Change Music #

Add Node > Audio > Music > Change Music

Play the victory music.

  • Play Type
    Select Play.
  • Music Clip
    Select Victory Theme.

Show Dialogue #

Add Node > UI > Dialogue > Show Dialogue

Show the victory message.

  • Dialogue Type
    Select Auto Close.
  • UI Box
    Select Battle Message.
  • Block Accept Button
    Enable this setting.
  • Close After
    Set to 5.
  • Wait
    Disable this setting.
  • Text (Message Content)
    Set to: <color=#FF00FFFF>Victory!</color>

Wait #

Add Node > Base > Wait

Wait a second.

  • Time
    Select Value > Value.
    Set the value to 1.

Collect Battle Gains #

Add Node > Battle > Gains > Collect Battle Gains

This node is used to collect experience and loot from a battle – we’ll also display the loot dialogue.

  • Show Gains
    Enable this setting.
  • Collect Loot
    Enable this setting.
  • Collect Experience
    Enable this setting.
  • Wait
    Enable this setting.

Wait #

Add Node > Base > Wait

Wait a short time before fading out the screen.

  • Time
    Select Value > Value.
    Set the value to 0.5.

Change Music #

Add Node > Audio > Music > Change Music

Now we’ll fade back to the stored music (we stored it in the battle start schematic).

  • Play Type
    Select Fade To.
  • Play Stored Music
    Enable this setting.
  • Fade Time
    Set to 1.
  • Interpolation
    Select Linear.

Fade Screen #

Add Node > Animation > Fade > Fade Screen

We’ll fade out the screen to hide removing all combatants except the player, also switching off the game states to hide equipment and HUDs.

  • Wait
    Enable this setting.
  • Time
    Set to 0.5.
  • Interpolation
    Select Linear.
  • Fade Alpha/Red/Green/Blue
    Enable these settings.
  • Start Color
    Set to a black color with no alpha (fully transparen, A=0).
  • End Color
    Set to a black color with full alpha (not transparent, A=1 or 255, based on your color picker).

Destroy Battle Combatants #

Add Node > Battle > Spawn > Destroy Battle Combatants

This node is used to destroy combatants participating in battle.

We’ll use it to remove all combatants except for the player.

  • Destroy Player
    Disable this setting.
  • Destroy All
    Enable this setting.

Change Game State #

Add Node > Game > Game > Change Game State

We’ll inactivate our game states to hide the equipment and battle HUDs (which we’ll set up later).

Click on Add Game State.

  • Game State
    Select Show Equipment.
  • Set State
    Select Inactive.

Copy the Game State Change 0.

  • Game State
    Select Show Battle HUD.

Fade Screen #

Add Node > Animation > Fade > Fade Screen

Copy the previous Fade Screen node, time to fade in the screen again.

Click on the Swap Colors button to exchange the start and end color.

And that’s it for the schematic. Click on Save Schematic to save it, e.g. as BattleEndVictory.

Escape Schematic #

This battle end schematic is used when the player escaped the battle. We’ll not collect the loot and continue on.

Since this schematic is very similar to the victory one, we’ll just adjust some things and use Save Schematic As to save it as a new schematic.

Change Music (1st) #

Remove the 1st Change Music node (playing the Victory Theme).

Show Dialogue #

Adjust the time and text.

  • Close After
    Set to 2.
  • Text (Message Content)
    Set to: <color=#FFFF00FF>You Escaped!</color>

Collect Battle Gains #

Remove this node.

Wait (2nd) #

Remove the 2nd Wait node (waiting 0.5 seconds).

Clear Battle Gains #

Add Node > Battle > Gains > Clear Battle Gains

This node is used to remove battle gains without collecting them.

Add it after the 1st Wait node (i.e. instead of the Collect Battle Gains node).

The default setup is enough, i.e. clearing loot, experience and normal SV.

The rest of the setup can remain the same, i.e. changing music to stored, fading out the screen, etc.

And that’s it for the schematic. Click on Save Schematic As … to save it, e.g. as BattleEndEscape.

Defeat Schematic #

This battle end schematic is used when the player was defeated in battle. We’ll call game over.

We’ll once again adjust the current schematic (escape) and use Save Schematic As to save it as a new schematic.

Show Dialogue #

Adjust the time and text.

  • Close After
    Set to 3.
  • Text (Message Content)
    Set to: <color=#FF0000FF>You Lost!</color>

Wait #

We’ll wait a bit longer.

  • Time
    Select Value > Value.
    Set the value to 2.

Change Music #

  • Play Type
    Select Fade Out.

Remove all nodes after the Change Music node – you can quickly remove a node and all it’s following nodes using the context menu: Remove Node Chain

Game Over #

Add Node > Game > Game > Game Over

This node will call game over according to the Game Over Settings (see below).

No further settings.

And that’s it for the schematic. Click on Save Schematic As … to save it, e.g. as BattleEndDefeat.

Game Over Settings #

Navigate to Game > Game Settings, we’ll take a look at the Game Over Settings.

You can learn more about game over in this documentation.

ORK Game Settings > Game Over Settings #

  • Load Scene
    Leave this empty.
    If you define the name of a scene, it’ll be loaded on game over as the game over scene.
    Leaving it empty will load the start menu scene.
  • Auto Game Over
    Enable this setting.
    This’ll automatically call game over when the player/group is dead out of battle or in real time area battles.
  • Wait Time
    Set to 1.
    This is the time before game over is executed.

Save Changes #

And that’s it for the battle start/end schematics!

Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Next, we’ll set up schematics for animating camera changes and the use of abilities and items.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on March 19, 2022
Table of Contents
  • Battle Message UI Box
    • UI Box Prefab
      • Rect Transform
      • Image
      • TextMeshPro - Text (UI)
    • New UI Layer
    • UI Box Setup
      • Base Settings
      • Unity UI
      • Override Default Settings > Schematics
    • Game State
  • Battle Start Schematic
    • Settings
      • Actors
    • Store Music
    • Change Music
    • Play Sound (Channel)
    • Show Dialogue
    • Change Camera Position
    • Wait
    • Fade Screen
    • Place At Spots
    • Spawn Battle Combatants
    • Stop Camera Position Fade
    • Initial Camera Position
    • Block Camera Control
    • Camera Control Target
    • Death Animation
    • Change Game State
    • Fade Screen
  • Victory Schematic
    • Settings
    • Change Music
    • Show Dialogue
    • Wait
    • Collect Battle Gains
    • Wait
    • Change Music
    • Fade Screen
    • Destroy Battle Combatants
    • Change Game State
    • Fade Screen
  • Escape Schematic
    • Change Music (1st)
    • Show Dialogue
    • Collect Battle Gains
    • Wait (2nd)
    • Clear Battle Gains
  • Defeat Schematic
    • Show Dialogue
    • Wait
    • Change Music
    • Game Over
  • Game Over Settings
    • ORK Game Settings > Game Over Settings
  • Save Changes
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (59)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (129)
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!