FANDOM


Screenshot 5

It is common for RPGs to have mounts, animals that can be ridden. This guide will serve to explain how to implement a smooth mount system through simple eventing.

Download Demo

Usage Edit

Mounts can serve a variety of purposes in RPG games. In a game where overworld map is not utilized, it is useful to have a mount to speed up travel time along the roads. They can also be designed to allow passage through an otherwise impassable terrain. Different exotic animals can become rare mounts that are hard to obtain and serves as a bragging right. The eventing demonstrated here serves as a basis for customization and personalization.

Event Analysis Edit

The mount system detailed in the demo is composed of various common events that runs on conditional checks.

MountEvent1

The main condition check for the mounting common event.

The first common event, HorseMount is essentially a variety of conditions that must be satisfied for the playable character to mount up. This event is set to parallel process based on a condition switch that is turned on at the beginning of the game.

  1. Conditional Branch: Script $game_player.movable? checks if the player character is movable. This is necessary to prevent the character from mounting during Scenes where mounting should not be allowed.
  2. Conditional Branch: Variable [0001:MountTimeVar] >= 4 The MountTimeVar variable is increased by 1 every 15 frames (.25 seconds). This variable is used to prevent the user from mounting over and over again by holding down the button. Using this condition check, the player can only initiate one mount/dismount every 1 second.
  3. Conditional Branch: [0003:NoMountZone] == OFF Certain indoor areas should prevent the player from mounting. If this switch is on, the player cannot mount.
  4. Conditional Branch: [Seal of the Rider] in Inventory This checks for a certain item to be in inventory in order for the mounting event to run.
  5. Conditional Branch: Script: Input.press?(Input::Y) This is the button check. It checks if the button "S" is being pressed.
  6. Conditional Branch: Variable [0002:WhichMount?] == 0 This checks for the variable of mount. In this demo, the variable is set so that 0 is horse, 1 is wolf, and 2 is a cow. Depending on which variable it is, the corresponding mounting event would be ran.

The second part of the common event is the each individual riding processing. For this demo, this event has 3 different variations. One each for the horse, wolf and cow.

Using the HorseMount(Horse) event as the example,

MountEvent3
  1. Conditional Branch: Switch[0002:Mounted] == OFF This checks for the status of the character. If the character is not mounted, it will run the next part and proceed to mount up.
    1. Show Animation: Player, [Mount1] This just displays the first part of the sparkly animation focusing on the player.
    2. Play SE: 'Horse' 80, 100 Plays the horse sound effect.
    3. Set Move Route: Player
      1. Change Speed: 5 Changes the speed of the player to reflect on the speed of the mount.
      2. Graphic 'Riding', 6 Changes the player's current graphic into the riding graphic.
    4. Script: $game_actors[1].set_graphic("Riding", 6, $game_actors[1].face_name, $game_actors[1].face_index) This function changes the primary actor's graphic into that of the horse. The reason why this is necessary is because if this scriptcall was not ran, opening the menu and closing it would reset the player's graphic back to the non-riding form yet still retains the speed change from the mount.
    5. Show Animation: Player, [Mount2] Displays the second part of the sparkly animation.
    6. Control Switches: [0002:Mounted] = ON Changes the switch so that the player is now flagged as being on a mount.
    7. Control Variables: [0001: MountTimeVar] = 0 Resets the MountTimeVar back to 0, so that the player cannot mount again until 1 second later.
  2. Else : Conditional Branch: Switch[0002:Mounted] == ON This part checks if the character is flagged as mounted.
    1. Show Animation: Player, [Mount1] Display of sparkly animation.
    2. Set Move Route: Player
      1. Change Speed: 4 Changes the speed back to normal.
      2. Graphic 'Actor4', 2 Changes the player's current graphic back to the actor.
    3. $game_actors[1].set_graphic("Actor4", 2, $game_actors[1].face_name, $game_actors[1].face_index) Changes the actor's system graphic back to normal.
    4. Show Animation: Player, [Mount2] Displays the second part of the sparkly animation.
    5. Control Switches: [0002:Mounted] = OFF Changes the switch so that the player is no longer flagged as being on a mount.
    6. Control Variables: [0001: MountTimeVar] = 0 Resets the MountTimeVar back to 0, so that the player cannot mount again until 1 second later.
MountEvent4

The third common event is the event that counts the MountTimeVar.

  1. Wait: 15 frame(s) Waiting .25 second.
  2. Control Variables [0001: MountTimeVar] += 1 Adding 1 every .25 second.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.