Mount System
Welcome to the Mount System for Mythril2d 3.0 and newer.
This system will let you summon mounts, call mounts over to you, ride mounts and setup many different customizable options. Is it perfect, no. Will it hopefully help you expedite your own mount system, absolutely. I would consider this a bare bones mount structure, with just enough to make it useful. Please watch the video for a full breakdown of the features, but here’s a summary as well:
Features:
- Ride mounts - with temporary effect applied to rider - like speed boosts.
- Dismount - on taking damage, on entering a building or with a button push - includes remount cooldown timer
- Stay mounted while transitioning - if you teleport to a new scene while mounted - and the new scene allows riding, you will stay mounted
- Block new summons while indoors
- Destroy if you get too far from your mount
- Summon from off the screen - so it looks like it runs over to you
- Use abilities while mounted
- Inspector controls to change mount position / offsets / collider sizes
Minimal edits required to OEM - which will be outlined in a separate post. Install with unity package - again will be in a separate post (likely tomorrow).
Scripts In Package: Mount.cs MountSheet.cs MountSummonAbility.cs MountSummonAbilitySheet.cs MountController.cs RiderController.cs MountPolyDirectionalAnimationStrategy.cs MountBiDirectionalAnimationStrategy.cs NoMountTeleporter.cs ToggleMount.cs
Prefabs/Scenes: Horse Pasture Scene Horse House Scene Mount Prefab SummonMount Prefab
Scriptable Objects: AB_SummonMount CS_Mount
Required changes to Mythril2D: InputSystem -> for dismount button
Please add this public getter to Movable.cs:
public IAnimationStrategy animationStrategy => m_animationStrategy;
Please add these two to public enum EAbilityFireCheckResult
public enum EAbilityFireCheckResult
{
Valid,
OnCooldown,
NotEnoughMana,
Incapacitated,
Unknown,
AlreadyMounted,
NotIndoors
}
This will clean up the two errors from installing the package. Next we need to hook-up the messages and dismount button.
In the HUD prefab, change the messages system to include the newly added FireCheckResults - image attached for reference.
If you want a button to dismount the player, In the InputSystem.cs: Add a GameplayActions
public InputAction dismount;
Then lower down add to SetupGameplayActions():
dismount = actions.FindAction("Dismount")
Lastly you will need to add the button/action to your player inputs, see image as reference.
I lied… one more thing - pick which character you are using, i.e., your Player - like Devon - and change the prefab to Rider Controller + MountBiDirectional (or Poly depending on use) - these both are subclasses of the Player Controller and BidirectionalAnimationStrategy - so they will have any changes you’ve made - but extend a few extras. See image as example.
I lied agian - don’t forget to add the 2 demo scenes to the Build Settings… otherwise, you’ll get errors when you enter them - also - I’m not sure why the ground turned pink on the Horse Pasture - just re-draw it if it bugs you 😉 Hopefully this is the last update!

💬 Comments (10)
📎 Files
Want to continue the conversation?