The Heartlander #7 - Gnome Rider
Hey there!
I'm here with another little DevLog!
Knight's Problem
Imagine this:
You are a Brave Knight in search of your Super Sacred Great Sword that has been taken to the Dark Castle of Bad Guys.
You enter one of the rooms where you face two problems:
- The next door is on a higher level, there is no way you can jump there even from the cube on the left side.
- An Ogre is patrolling this specific room.
Without your sword, you have little chance of slaying a foul beast, but as a smart Knight, you jump onto the Ogre, poke him in the eye, grab him by his big ears and ride your way to the other side just to jump off on the right cube.
So this Enemy is more like a Puzzle, right?
Gnome's Problem
As you may know, there are Poisoned Snails enemies in my game.
As you can see in the picture below "Knight's Problem" can be applied here. So why don't we make a Mountable Enemy?
The first thing I did was create Snail Spawner with a Spline component, that will guide the POI sphere around the Spline, so Snail had something to follow.
- f_Spawn_Snail spawns a Snail Character on the first point of Spline with according orientation
- f_Begin_Timeline sets SnailMovementTL's looping and starting position
- f_Set_Timeline_Speed sets a speed of a POI movement by calculating the distance between POI and Snail so that Snail could never reach POI (so sad)
- f_Snail_Follow_Sphere updates POI Sphere position by Timeline
Inside the Snail Character, I've made a Timer that spawns Poisoned Stains on the ground, and on Event Tick, I've added Simple Move To.
So here's the result - Snail Moves after invisible sphere inside Spline.
Pretty simple, but it works just fine.
Taming the Beast.
If we want our Character to land on Snail and Mount it - we simply need to add Trace that will check for a Snail and if it's Ridable via Gameplay Tag. Then I make pretty standard stuff, like attaching meshes and Setting offsets. To sync animations and transfer movement inputs I've created an Interface with such functions.
All I've done is a function that will send from Snail's Anim BP info about Direction, which will be applied to Blendspace of Gnome while he is Riding.
For movement, I begin to transfer inputs from Gnome to Snail Directly. Gnome can't move while he is Riding.
That's what we get:
Good enough. But we also need to Dismount, and we need to do it in the desired Direction. That's why while Syncing Inputs I store Input Z rotation, and when Character Dettaches from Snail I feed him this Z Rotation.
Everything else is done via changing States and with Root animations.
Here is the final result!
Hope you've enjoyed reading.
Let me remind you that you can support Development on my Patreon and get a fresh Demo to play on a game's page.
See you next time :)
Files
Get The Heartlander
The Heartlander
Status | Prototype |
Author | NNJohn |
Genre | Adventure, Action, Role Playing |
Tags | blog, Game Design |
More posts
- The Heartlander #6 - Is this the AI? Is this just BP?Nov 07, 2021
- The Heartlander #5 - New BeginningsSep 30, 2021
- Untitled Gnome Game Devlog #4 - But the Game Actually Gets a TitleSep 25, 2021
- Untitled Gnome Game Devlog #3 - Simple Actions - Pick upAug 09, 2020
- Untitled Gnome Game Devlog #2 - Friendship ended with BLENDERAug 01, 2020
- Untitled Gnome Game Devlog #1 - Getting StartedJul 31, 2020
- Untitled Gnome Game Devlog #0 - what is going on here?!Jul 30, 2020
Leave a comment
Log in with itch.io to leave a comment.