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
  • Gameplay Bits
  • Multi Interaction Controllers

Multi Interaction Controllers

Table of Contents
  • Adding a Machine Type
    • Save Changes
  • Prefab Setup
    • Item Interactions
      • Interaction Controller
      • Box Collider
      • Sphere Collider
    • Other Interactions
      • Transform
      • Interaction Controller
      • Box Collider
    • Create Prefab
  • Interaction Settings
    • Interaction Settings
  • Inventory Settings (Optional)
    • Item Collection
      • After Collection (Ok)
      • Collection Dialogue
    • Notification Settings
      • Item Added
      • Equipment Added
      • Currency Added
  • Save Changes
  • Item Collectors
    • Start Settings
      • Object Turn Settings
  • Testing
  • Tip: Unwanted Notifications

Use multiple interaction controllers to interact with different things at different ranges.

Want to pick up items all around you but only speak to NPCs or interact with other things when they are right in front of you? This can be done by using a multi interaction controller setup.

In this tutorial we’ll create such a setup:

  • 1 interaction controller with a larger range around the player to interact with items
  • 1 interaction controller in front of the player to interact with everything

This tutorial is based on the 3D RPG Playground series, but you can use this for any kind of project – just keep the size of your player in mind when creating the interaction controller prefab.

Adding a Machine Type #

First, we’ll add a machine type for our item interactions.

Machine types can be assigned to interactions (and other machine components). Interaction Controllers and Interaction HUDs can be limited to only use defined machine types. E.g. we’ll add an Item machine type and have the larger interaction controller for items only interact with the Item machine type.

Open the editor, navigate to Base/Control > Machine Types and add a new type.

  • Name
    Set to Item.

Save Changes #

And that’s it for the editor setup for now.

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

You can close the editor now.

Prefab Setup #

Create an empty game object in your scene. We’ll add our 2 interaction controllers as child objects of this game object (and make a prefab out of it).

Item Interactions #

Add an interaction controller as a child object to the empty game object using the scene hierarchy context menu: Makinom > Interaction Controller (3D)

Rename the created game object to Item Interactions.

For interacting with items, we’ll use a Sphere Collider to just pick up anything around the player.

Interaction Controller #

We want to limit this interaction controller to only use the Item machine type, i.e. it can only interact with interactions that use the defined machine type.

  • Priority
    Set to 0.
    The priority of interaction controllers decides the order in which they’ll be checked for available interactions.
    They’re sorted by descending priority, i.e. the highest priority value will be used first.
    We’ll keep the priority at 0 for the item interactions and prioritize other interactions.
  • Interact With Nearest
    Enable this setting.
    The interaction closest to the interaction controller will be used first.
  • Any Interaction
    Disable this setting.
    We want to limit this to only use item interactions.

Click on Add Machine Type.

  • Machine Type
    Select Item.

Box Collider #

We’ll use a Sphere Collider instead, so remove the Box Collider component.

Sphere Collider #

Add a Sphere Collider component using the component menu.

  • Is Trigger
    Enable this setting.
  • Radius
    Set to 4.

Other Interactions #

Again, add a new interaction controller as a child object of the empty game object using the scene hierarchy context menu: Makinom > Interaction Controller (3D)

Rename the created game object to Other Interactions.

For other interactions, we want to interact with what’s right in front of the player, so we’ll stick with the default Box Collider.

Transform #

To have the box in front of the player, we need to move it forward on the Z axis.

  • Position
    Set to X=0, Y=0, Z=1.

The position is based on the 3D RPG Playground’s player, which has a radius of 0.7.

Interaction Controller #

This interaction controller should be able to interact with anything, so we don’t limit it.

  • Priority
    Set to 1.
    Due to having a higher priority than the item interaction controller it’ll be used first (if it has an available interaction).
  • Interact With Nearest
    Enable this setting.
  • Any Interaction
    Enable this setting.
    We want to interact without limitations.

Box Collider #

We’ll adjust the hight to match the player’s height of 3.

  • Size
    Set to X=1.5, Y=3, Z=1.

The finished interaction controller will look like this.

Create Prefab #

Create a prefab out of the root game object, e.g. name it Multi Interaction Controller.

You can remove the game object from the scene now.

Interaction Settings #

Next, we use the prefab we created in the interaction settings to automatically add it to the player.

Open the editor and navigate to Base/Control > Game Controls.

Interaction Settings #

I’ll also list the general setup for using an interaction controller.

  • Interaction Control
    Select Interaction Controller.
  • Interact Key
    Select the input key you want to interact with, e.g. the Accept key.

We’ll automatically add the interaction controller to the player using our prefab.

  • Add Automatically (Interaction Controller)
    Enable this setting.
  • IC Prefab
    Select the Multi Interaction Controller prefab we created.

We’ll also place it at half height of our player combatant (height is 3, i.e. 1.5) to match it with the prefab’s setup. The box interaction controller (for all interactions) should be placed in front of the player covering it’s full height.

  • Offset
    Set to X=0, Y=1.5, Z=0.

Inventory Settings (Optional) #

Let’s also change how items are collected – instead of showing a dialogue, we’ll just collect them immediately and use a notification to show what we collected.

Navigate to Inventory > Inventory Settings.

Item Collection #

If you’re also basing this on the 3D RPG Playground tutorials, you’ll have set up using an animation and audio clip after collection – we’ll at least remove the animation.

After Collection (Ok) #

  • Use Animation
    Disable this setting.
  • Play Sound
    Enable this setting if you want to play a sound.
  • Audio Clip
    Select the audio clip you want to play, e.g. chainmail1 when using the 3D RPG Playground assets.

Collection Dialogue #

  • Show Dialogue
    Disable this setting.
    We don’t show the collection dialogue, using inventory notifications instead.

Tip!

You can also set up the Collection Dialogue to work similar to a notification, but you can’t make use of UI layouts or notification queues in that case.

For this, enable Auto Close in the collection dialogue’s settings.

Notification Settings #

If you haven’t set up notifications in your project yet, check out this tutorial from the 3D RPG Playground series (you only need to follow the Notification UI Box and Notifications setup).

We’ll only use Add notifications for adding items to the player’s inventory and sitck with the default notification setup from the tutorial. So, we only have to enable showing the notifications and can even keep the default texts (I’ll list them anyway).

Item Added #

  • Show Notification
    Enable this setting.
  • Text (Message Content)
    Set to: <name> (<quantity>) added

Equipment Added #

  • Show Notification
    Enable this setting.
  • Text (Message Content)
    Set to: <name> (<quantity>) added

Currency Added #

  • Show Notification
    Enable this setting.
  • Text (Message Content)
    Set to: <name> (<quantity>) added

If you use AI behaviours or AI rulesets in your project, you can also set up the AI Behaviour Added and AI Ruleset Added notifications.

For crafting recipes, you can find the notifications in Inventory > Crafting Settings & Types > General Settings.

Save Changes #

And that’s it for the editor setup.

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

Item Collectors #

To get Item Collectors recognized by the larger interaction controller, we need to use the Item machine type we set up.

This is done in the Start Settings of an Item Collector component.

If you’re looking for a tutorial on adding item collectors, check out this tutorial from the 3D RPG Playground series.

Start Settings #

  • Machine Type
    Select Item.

Object Turn Settings #

Since we simply collect the items without any dialogue or animation, we also don’t want the player to turn to the item.

  • Turn Starting Object
    Disable this setting.

Testing #

Test your interaction controllers on regular interactions and item collectors (using the Item machine type).

Having the regular interaction right in front of the player works as usual (the interaction being in the Other Interactions controller).

Not facing it will not allow us to interact with it (it’s still in the Item Interactions controller). So far, this is the usual behaviour when using a single interaction controller.

However, the item collector (with Item machine type) is also available when not facing it and being a bit away from it.

Interacting with it now will immediately collect it and show the item notification.

Here’s the whole thing in action:

https://orkframework.com/wp-content/uploads/ork3_tutorial_gameplay_bits__multi_interaction_controller.mp4

Tip: Unwanted Notifications #

When setting up Item Added and similar notifications you might get spammed with these notifications at certain times, e.g. from a combatant’s start inventory or your project’s start game schematic.

Nodes like the Add To Inventory node have an option for showing or not showing notifications.

However, you can also completely block notifications using a Block Notifications node – e.g. use one at the start of your start game schematic to block notifications and one at the end to allow notifications again to prevent any notifications from your initial game and inventory setup to show notifications.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on February 17, 2022
Table of Contents
  • Adding a Machine Type
    • Save Changes
  • Prefab Setup
    • Item Interactions
      • Interaction Controller
      • Box Collider
      • Sphere Collider
    • Other Interactions
      • Transform
      • Interaction Controller
      • Box Collider
    • Create Prefab
  • Interaction Settings
    • Interaction Settings
  • Inventory Settings (Optional)
    • Item Collection
      • After Collection (Ok)
      • Collection Dialogue
    • Notification Settings
      • Item Added
      • Equipment Added
      • Currency Added
  • Save Changes
  • Item Collectors
    • Start Settings
      • Object Turn Settings
  • Testing
  • Tip: Unwanted Notifications
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!