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

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

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

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

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

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

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

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

UI Setups

16
  • 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: Battle Actions 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

13
  • 2.5D Setup
  • Body Part Weakpoint
  • Click Attack
  • Combining Input Origins
  • Combining Status Value Flying Texts
  • Fun With Flying Text
  • HUD Effects With Conditional Schematics
  • Inventory Containers
  • Local Multiplayer
  • Multi Interaction Controllers
  • Target Selection Lines
  • World Space HUD
  • World Space Dialogue
  • Home
  • Guide
  • Tutorials
  • 3D RPG Playground
  • 16 Follow Me!
View Categories

16 Follow Me!

In this tutorial we’ll spawn the other player group members in the field and let them follow the player.

The world can be a lonely place if your group members aren’t walking beside you – so let’s change that.

We’ll let the player’s battle group members spawn beside the player, use a move AI to make them follow the player and a formation to follow them in style.

Spawning Player Group Members #

Navigate to Game > Game Settings, this is where the general player group settings are made.

ORK Game Settings > Player/Group Settings #

We’ll simply have to turn on spawning group members.

  • Spawn Group
    Enable this setting.

You can control the distance they spawn from the player using the Distance setting, but that doesn’t concern us, as we’re using a formation to handle that.

If you test now, the battle group members will spawn with the player, but use the default move AI, i.e. not follow the player, randomly moving around.

Formation #

Next, we’ll set up the formation the group will move in. You can learn more about formations in this documentation.

Navigate to Combatants > Formations, we’ll change the Default formation.

  • Name
    Set to Player.
  • Place On Ground
    Enable this setting.
    This’ll use a raycast to find the ground for our positions.
  • Layer Mask
    Select only the Default layer.
    First select Nothing, then select Default.
    Our ground (and other level architecture) is on the Default layer.

Field Positions #

We’ll define the positions our group members will follow their group leader (i.e. the player) here.

Positions can be created in a visual editor – you can add postions using a right-click and move them around using left-click-dragging.

Add 2 positions like this:

For further precision, you can also edit the positions below the formation graph.

Formation Position 0 #

  • Position
    Set to X=-1.5, Y=0, Z=-1.5.
  • Local Space
    Enable this setting.
    This is enabled by default – it makes sure the positions are in local space of the user, i.e. they’ll turn with it.

Formation Position 1 #

  • Position
    Set to X=1.5, Y=0, Z=-1.5.
  • Local Space
    Enable this setting.

Battle Positions #

We’re not going to use the formation in battles. If you want to use it, just add positions to it.

When using a formation for battle, only the leader will be placed using the battle spots, the other group members will be placed according to the used formation.

Formations are not only available for the player, they can also be used by enemies and other AI controlled groups.

Move AI #

Next, we’ll set up the move AI for the player group members. Their move AI will only follow their group leader instead of hunting enemies.

Navigate to Combatants > Move AIsand add a new move AI.

  • Name
    Set to Follow Leader.

Group Settings #

These settings manage following the group leader.

  • Follow Leader
    Enable this setting.

Follow Range #

We’ll follow the leader at a distance of 3 world units with a threshold of 0.5.

  • Range
    Select Value > Value.
    Set the value to 3.
  • Threshold
    Select Value > Value.
    Set the value to 0.5.
    This is usually the default threshold.

Give Way #

The combatants can move away from the leader to give them space to move, we’ll use that.

  • Give Way
    Enable this setting.
  • Range
    Select Value > Value.
    Set the value to 1.
  • Threshold
    Select Value > Value.
    Set the value to 0.5.
    This is usually the default threshold.

Auto Respawn #

We’ll automatically respawn combatants when they are too far away.

E.g. in case they get stuck somewhere, this’ll reset them.

  • Auto Respawn
    Enable this setting.
  • Range
    Select Value > Value.
    Set the value to 30.

Prioritise Leader #

We don’t need to use this, since our combatants will only follow the leader and do nothing else.

In case you want to use random patrol (while they’re not following the leader) or other move AI features for the combatants, this can ensure they’ll follow the leader if they are too far away.

Updating Combatants #

We need to set up our player combatants to use the move AI we just created.

Navigate to Combatants > Combatants, we’ll change the following combatants:

  • Warrior
  • Rogue
  • Ranger
  • Wizard
  • Cleric
  • Monk

The setup is the same for all combatants.

Animations & Movement > Movement Settings > Move AI #

  • Own Move AI
    Enable this setting.
  • Use Move AI
    Enable this setting.
  • Move AI
    Select Follow Leader.

Save Changes #

That’s it for the setup so far.

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

Updating Start Game Schematic #

All that’s left to do is actually use the formation we set up. Formations can be used by combatant group setups (Combatants > Combatant Groups), battle AIs and schematics.

We’ll update the Start Game schematic to use the formation.

Open the StartGame schematic we set up at the start of this tutorial.

Change Formation #

Add Node > Combatant > Formation > Change Formation

Add the node before the Spawn ORK Player node, otherwise the group members will not already spawn in formation.

  • Formation
    Select Player.
  • Object (Combatant)
    Select Player.

And that’s it – click on Save Schematic to save the changes.

Testing #

Hit play to test the group spawning.

And they keep following me in formation – great!

 

Next, we’ll set up a better loot dialogue to show the battle gains!

Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Table of Contents
  • Spawning Player Group Members
    • ORK Game Settings > Player/Group Settings
  • Formation
    • Field Positions
      • Formation Position 0
      • Formation Position 1
    • Battle Positions
  • Move AI
    • Group Settings
      • Follow Range
      • Give Way
      • Auto Respawn
      • Prioritise Leader
  • Updating Combatants
    • Animations & Movement > Movement Settings > Move AI
  • Save Changes
  • Updating Start Game Schematic
    • Change Formation
  • 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 (69)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (149)
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!