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

2D RPG Quickstart

  • START 2D RPG Quickstart
  • 01 Initial 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
  • END 2D RPG Quickstart

3D RPG Quickstart

  • START 3D RPG Quickstart
  • 01 Initial 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
  • END 3D RPG Quickstart

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: Canvas with Screen Space Camera
  • 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
  • DUNGEON 04 Traps on Level 3

DUNGEON 04 Traps on Level 3

Table of Contents
  • Spike Trap Schematic
    • Activate Object
    • Play Sound
    • Change Status Value
    • Wait
    • Activate Object
  • The Spike Trap Prefab
    • Box Collider
    • Trigger Machine
      • Start Settings
      • Machine Execution Settings
  • Testing
  • Dungeon Level 3
    • Level Zone
      • Level Settings
    • Item Collector (Small Key)
      • Item Settings > Item 0
    • Battles
      • Combatant Spawner > Combatant Settings > Combatant 0
    • Additional Item Collectors
  • Enter Level 4
    • Scene Changer
      • Scene Change Settings > Scene Settings > Target Scene 0
    • Spawn Point
      • Transform
      • Spawn Point
  • Exit Level 4
    • Adding a Game Starter
    • Adding a Spawn Point
      • Transform
      • Spawn Point
    • Adding a Scene Changer
      • Scene Change Settings > Scene Settings > Target Scene 0
  • Testing

In this tutorial we’ll set up traps and dungeon level 3.

This tutorial continues the sub-series for setting up the dungeon.

You might have noticed the strange floor plates with holes in some parts of the Dungeon Level 3 scene (open the scene if you haven’t already, found in Assets/Scenes/Dungeon/). We’ll turn them into traps.

Like we did with the trapdoor, we’ll make those changes directly on the prefab to have them on all traps in the dungeon.

There are 2 ways to create traps – one involves using Damage Dealer (in Always Active environmental damage setup) and Damage Zone components (learn more about those components in this documentation), the other simply using schematics.

Since we don’t use damage dealers/zones in our setup, we’ll just use schematics.

Spike Trap Schematic #

Our schematic will activate a child object of the trap’s game object (the spikes), damage the player group’s health by 10% and disable the spikes again (after a short wait).

The controls will not be blocked, so the trap just activates while the player can continue to move (i.e. we don’t need to set that up in the Settings node).

Activate Object #

Add Node > Game Object > Game Object > Activate Object

We’ll enable a child object of the trap (Machine Object), the Spikes.

  • Set Active
    Enable this setting.
  • Object
    Select Machine Object.
  • Child Object
    Set to Spikes.

Play Sound #

Add Node > Audio > Audio > Play Sound

We’ll play the Damage sound type on the player.

  • Object (Play On)
    Select Player.
  • Use Sound Type
    Enable this setting.
  • Sound Type
    Select Damage.
  • Play One Shot
    Enable this setting.

Change Status Value #

Add Node > Combatant > Status > Change Status Value

We’ll reduce the whole player group’s health by 10%.

  • Object (Combatant)
    Select Player.
  • Whole Group
    Enable this setting.
  • Status Value
    Select Health Points.
  • Show Flying Text
    Enable this setting.
  • Set In
    Select Percent.
  • Operator
    Select Sub.
  • Value
    Select Value > Value.
    Set the value to 10.

Wait #

Add Node > Base > Wait

We’ll wait for a second before disabling the spikes again.

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

Activate Object #

Add Node > Game Object > Game Object > Activate Object

Copy the first Activate Object node and change the following setting.

  • Set Active
    Disable this setting.

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

The Spike Trap Prefab #

Select one of the traps (Trap_Block game object) in the scene.

Now, open the trap’s prefab to edit it.

We’ll add a Box Collider (used as trigger) and a Trigger Machine component to the prefab.

Box Collider #

Add a Box Collider component to the prefab’s root game object (Trap_Block) using the component menu.

The collider’s bounds shouldn’t cover the whole trap, so that it only activates when the player moves on it.

I’m using this setup.

  • Is Trigger
    Enable this setting.
  • Center
    Set to X=0, Y=1, Z=0.
  • Size
    Set to X=2.5, Y=2, Z=2.5.

Trigger Machine #

Add a Trigger Machine component to the same game object using the component menu.

Trigger machines start on trigger events, e.g. trigger enter.

Start Settings #

  • Trigger Enter
    Enable this setting.
    Starts when the player enter the game object’s trigger.
    Optionally, you can also start it when other game objects enter it (see the Starting Objects settings for this).

Machine Execution Settings #

Like with Interaction Machines we already used, this defines the schematic we’re using in the machine.

  • Schematic Asset
    Select the SpikeTrap schematic.

The rest of the settings can be kept as they are.

That’s it for the prefab setup – save the changes and return to the scene (i.e. close editing the prefab).

All traps in the scene now have our setup, let’s test it!

Testing #

Hit play directly in the scene and run into a trap.

It hurts – success!

Let’s finish up level 3.

Dungeon Level 3 #

We’ll add a level zone, item collectors (small key and additional items) and battles.

Level Zone #

Add a level zone either using the scene hierarchy context menu (ORK Framework > Zome > Level Zone (Scene)) or the Makinom scene wizard (Create Game Object > Level Zone (Scene)).

Level Settings #

  • Use Minimum Level
    Enable this setting.
  • Minimum Level
    Set to 10.
  • Set Levels
    Enable this setting.
  • Set Level
    Select Player.
  • Minimum Offset
    Set to -1.
  • Maximum Offset
    Set to 1.

Item Collector (Small Key) #

Add an item collector either via the scene hierarchy context menu (ORK Framework > Item Collector) or the Makinom scene wizard (Create Game Object > Item Collector).

Place the item collector on the crate in the upper center room.

Item Settings > Item 0 #

  • Item
    Select Small Key.

Battles #

Place battles using the Combatant Spawner Range prefab.

Adjust the Box Collider of the Move AI Range to fit the rooms the battles are placed in, rotate them as needed and select the groups you want to use.

I’m using:

  • 2x Physical DPS, 1x Mage
  • 1x Tank, 1x Mage, 1x Supporter
  • 1x Tank, 2x Physical DPS
  • 2x Physical DPS, 1x Supporter
  • 1x Physical DPS, 1x Mage
  • 2x Physical DPS
  • Dragon (single combatant)

The Dragon is placed by the small key’s item collector. To use a single combatant, change the following setting of the Combatant Spawner. Additionally, the battle with the dragon is moved a bit away from the spawner, to have the battle in the center of the room but the enemy sticking to the door.

Combatant Spawner > Combatant Settings > Combatant 0 #

Change the used group on the Combatant Spawner child object.

  • Use Group
    Disable this setting.
  • Combatant
    Select Dragon.

Additional Item Collectors #

Add some additional item collectors to the scene to have the player something to pick up and enjoy.

You can add item collectors either via the scene hierarchy context menu (ORK Framework > Item Collector) or the Makinom scene wizard (Create Game Object > Item Collector).

E.g. I’m adding:

  • High Potion x2
  • High Potion x3
  • Magic Potion x3
  • Magic Potion x3
  • Revive Potion x3
  • Revive Potion x3
  • Armor 2 x1
  • Staff 2 x1
  • Regen Charm x1
  • Sword 2 x1
  • Bow 2 x1
  • Gold x300

Enter Level 4 #

We’ll now update the trapdoor in the level 3 scene to load Dungeon Level 4 and add a spawn point in front of the trapdoor.

Scene Changer #

Select the Entrance_Trapdoor_Block game object in case it’s no longer selected.

Adjust the following setting.

Scene Change Settings > Scene Settings > Target Scene 0 #

  • Target Scene
    Set to Dungeon Level 4.

Spawn Point #

Create a Spawn Point in front of the trapdoor, either using the scene hierarchy context menu (Makinom > Spawn Point) or the Makinom scene wizard (Create Game Object > Spawn Point).

The spawn point automatically receives the spawn ID 1, since this is the next unused spawn ID. We’ll adjust the rotation for our player’s spawn.

Transform #

  • Rotation
    Set to X=0, Y=-90, Z=0.

Spawn Point #

  • Use Rotation
    Enable Y, disable X and Z.

That’s it for level 3 – don’t forget to save your changes.

Exit Level 4 #

Open Dungeon Level 4 (Assets/Scenes/Dungeon/), we’ll add a spawn point and scene changer to return to level 3.

Adding a Game Starter #

Don’t forget that you need to add a Game Starter to a scene if you want to do a quick playtest right in the scene.

Create an ORK Game Starter either using the scene hierarchy context menu (ORK Framework > ORK Game Starter) or the Makinom scene wizard (Add ORK Game Starter > Add ORK Game Starter).

It doesn’t really matter where you place the game starter, but make sure to enable Start Game for quick game testing.

  • Start Game
    Enable this setting.

Adding a Spawn Point #

Create a Spawn Point either using the scene hierarchy context menu (Makinom > Spawn Point) or the Makinom scene wizard (Create Game Object > Spawn Point).

Place the spawn point in front of the stairs leading upwards – but not too close, as we’ll also add a scene changer to the stairs.

Transform #

  • Rotation
    Set to X=0, Y=90, Z=0.

Spawn Point #

  • Use Rotation
    Enable Y, disable X and Z.

Adding a Scene Changer #

Select the Entrance_Staircase_Block game object – you can easily select it by clicking on the arch of the staircase.

The scene changer has to be added to the root game object (Entrance_Staircase_Block), not one of it’s child objects. Use the component menu to add a Scene Changer component.

Scene Change Settings > Scene Settings > Target Scene 0 #

  • Target Scene
    Set to Dungeon Level 3.
  • Position Type
    Select Spawn ID.
  • Spawn ID
    Select Value > Value.
  • Value (Spawn ID)
    Set to 1.

And that’s it for level 4 – don’t forget to save your changes.

Testing #

Make a test run of level 3 if you want – maybe increase the player’s start level when testing directly in the scene.

Next, we’ll go even deeper into the dungeon.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on January 28, 2022
Table of Contents
  • Spike Trap Schematic
    • Activate Object
    • Play Sound
    • Change Status Value
    • Wait
    • Activate Object
  • The Spike Trap Prefab
    • Box Collider
    • Trigger Machine
      • Start Settings
      • Machine Execution Settings
  • Testing
  • Dungeon Level 3
    • Level Zone
      • Level Settings
    • Item Collector (Small Key)
      • Item Settings > Item 0
    • Battles
      • Combatant Spawner > Combatant Settings > Combatant 0
    • Additional Item Collectors
  • Enter Level 4
    • Scene Changer
      • Scene Change Settings > Scene Settings > Target Scene 0
    • Spawn Point
      • Transform
      • Spawn Point
  • Exit Level 4
    • Adding a Game Starter
    • Adding a Spawn Point
      • Transform
      • Spawn Point
    • Adding a Scene Changer
      • Scene Change Settings > Scene Settings > Target Scene 0
  • Testing
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (60)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (130)
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!