[RMXP]Simple Event Vehicle System
#1
I searched the forums to see if there was already something like this but found nothing, if this has been done already, I'm sorry.

This is a simple system for handling Vehicles in Rpg Maker XP, the system I use. :D

There are no scripts needed, no complex coding required, just 3 events on the map. 

==============DISCLAIMER==============

Note1: This is an event chain designed to work on one map. If you are making a world map, you will need to add  additional lines on each transition event to make sure that the player does not accidentally take the airship somewhere it should not go. Note2:  That this will not work with formation changers or party changers, as all this event chain does is change actor ID 1's graphic to the vehicle's graphic. This works in my game as all actors that join the party also participate in battle, meaning the player will never need to mess with the formation, i only ever need to change the leaders graphic as they will never leave the party or change position in the party.

====================================

now since that is out of the way we can begin with the actual tutorial! xD

First the easiest event: The Variables


.png   Tutorial1.png (Size: 71.67 KB / Downloads: 4)

The first variable will be the players X Location. Add a "Control Variable" command and create the variable named "PlayerX" and Set it to the Players MapX Position. As shown below.


.png   Tutorial2.png (Size: 108.65 KB / Downloads: 1)

The second variable will be the players Y Location. Add a "Control Variable" command and create the variable named "PlayerY" and Set it to the Players MapX Position.

The last variable will be the Terrain Tag. Add a "Control Variable" command and create the variable named "Terrain Tag" and have it call the Players Terrain Tag(This is the terrain tag the player is currently on. Yes, we will be using terrain tags. :O


.png   Tutorial3.png (Size: 99.64 KB / Downloads: 1)

Now, this will need to be a parallel process, as we will constantly need those 3 variables. I've named this Variables so that later on, we know not to change this event.


Now, for the actual Vehicle event. This one is easy but has some tricks to it.

First, we will need to have an event that the player can activate to Embark onto the vehicle, I will be using an edited airship graphic i got from: https://www.rpgmakercentral.com/topic/19...in-flight/

I've named this Airship so that we know event to call later on.


.png   Tutorial5.png (Size: 69.85 KB / Downloads: 1)

First we will need to turn off the switch "Embarked" so that when the player embarks the airship the event does not follow him and disappears. The image is from later on in the tutorial as I almost forgot to add that line.


.png   TutorialFix.png (Size: 90.45 KB / Downloads: 2)

Next I will add some text and a choice box to go with it, just in case the player does not actually want to Embark.(Optional really only necessary if you have the event be a touch activate)


.png   Tutorial6.png (Size: 75.05 KB / Downloads: 3)

Next, will be the dialog for when the player chooses no.(Optional)


.png   Tutorial7.png (Size: 79.82 KB / Downloads: 3)

Now, for the actual Vehicle Script. First we will need to change their movement speed, their Graphic, and if your doing an airship, Through and Always on Top(wouldn't be a good airship if everything blocked its movement would it, unless its supposed to be blocked. XD ) For my purposes the Through and Always on Top work as we will be limiting where the player can land later on, and thus can mark entire areas where the player can not access with the airship. Do not that this will also allow the player to move through the sprite, which is very important for later on.

First the Movement part, Create a "Set movement route" line and change the players speed to the desired speed, in this instance the fastest as its for an airship, and then whether you want to have it on top of everything.


.png   Tutorial8.png (Size: 117.05 KB / Downloads: 3)

Next, the graphic, Easy enough. In this instance i will be using "Change Actor Graphic" and change actor 1 to the appropriate sprite. I will use the Airship graphic.


.png   Tutorial10.png (Size: 129.11 KB / Downloads: 1)

Now, we need to set some switches, one self and one global. The Global Switch will be named Embarked, for easy reference, and self switch A will be used, Simple enough.


.png   Tutorial11.png (Size: 85.43 KB / Downloads: 1)

.png   Tutorial12.png (Size: 94.96 KB / Downloads: 1)

Also, if you wish to have a BGM this would be where you would put it. Example below.


.png   Tutorial13.png (Size: 80.08 KB / Downloads: 0)

Create a new page, make sure the Condition "Self Switch A is on" and leave the graphic empty, this is the part that hides the airship so that it looks like you "entered" it.


.png   Tutorial14.png (Size: 76.16 KB / Downloads: 0)

Now make one more page. Now on this page we need two conditions, one a new Switch "Disembarking" and the other one the self switch A. Now enter the event command Control Self Switch and turn self switch A off. This event will turn off both page 2 and 3, so that when the player is not "in" the airship, the airship is visible.


.png   TutorialFix2.png (Size: 73.36 KB / Downloads: 1)

Now, for the final event, and its all conditional branches. Dx

First, we need a condition to see if the player is in the airship, this is where the Variable "Embarked" comes in, so the first condition should be "If Switch "Embarked" is on.


.png   Tutorial17.png (Size: 103.58 KB / Downloads: 3)

Next, we need a button input call so that the player can "Disembark", now we do not want this to be the confirm, space or enter, so that the next condition will not loop. As if it is confirm, and players try to speed up text or skip text, it will loop the event until the player stops trying skip or speed up the text. so i use a button that is not used for any system call. but it can be changed to your liking.


.png   TutorialFix3.png (Size: 104.72 KB / Downloads: 1)

For the last conditional branch, we need to call the terrain tag variable we created at the beginning of the tutorial. For this tutorial I will be using Terrain Tag 1, but you can use any tag so long as it corresponds with the terrain you want the player to be able to land on.


.png   Tutorial18.png (Size: 100.1 KB / Downloads: 2)

Now for the actual meat of the Event Chain. In the third conditional branch use the "set event location" command, using appoint with variables having the X Coord being PlayerX and the Y Coord being PlayerY, to have it move the airship event to the players locations, Using the other two variables we created.


.png   TutorialFix5.png (Size: 108.05 KB / Downloads: 1)

Next we need to flip two switches.

Disembarking needs to be on. This will revert the Airship event back to the first page. allowing it to be visible and interacted with.


.png   Tutorial20.png (Size: 97.08 KB / Downloads: 1)

Embarked needs to be off. This is so the event recognizes that the player is no longer in the airship.


.png   Tutorial21.png (Size: 101.79 KB / Downloads: 0)

Now we need to revert the players speed, Through, and Always on Top, otherwise the player would clip through everything and be in front of things that they shouldn't.


.png   Tutorial19.png (Size: 128.14 KB / Downloads: 0)

This next command needs to revert the players character graphic back to what it was, in this case its Aluxes.


.png   Tutorial22.png (Size: 119.73 KB / Downloads: 1)

This next part is only needed if you used the BGM override command, we need to fade out any BGM override we performed so that the correct BGM for the map plays.

Lastly, and I honestly do not know if this is needed, Place "Exit Event Processing" at the end of each branch. I did this so as to not have the event loop. but with all those conditionals it might not be needed.


.png   TutorialFix4.png (Size: 93.39 KB / Downloads: 3)

There is not demo as this is just three events and pretty self explanatory. You will also note that I added a text stating that the player can not land at their current spot after the third condition's Else line. This is only needed to let the player know that they can not land there, you can also play a sound effect if you wish.

*The reason for so many attachments I've tried Imgur and Google Photos and both did not work when inserting links, so I've added each image as an attachment. I don't like photobucket as it resizes everything and I don't trust tinypic to keep the URL the same. If this is against rules just let me know and I will remove the attachments.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
  RPG Developer Bakin: Extensible 'Active Item' Event JayRay 0 1,148 01-28-2023, 02:37 AM
Last Post: JayRay
Smile RPG Developer Bakin: Quick Harvesting Event JayRay 1 1,706 01-04-2023, 05:44 AM
Last Post: JayRay
  DAY/NIGHT SYSTEM DerVVulfman 0 2,285 08-17-2021, 03:15 AM
Last Post: DerVVulfman
  The Guild - Evented Character Select System Mike_Everley 0 2,225 06-07-2021, 01:44 PM
Last Post: Mike_Everley
  Skill/Spell Book System for XP Mike_Everley 0 2,411 03-30-2021, 07:33 PM
Last Post: Mike_Everley
  Simple Logic Tutor in Ace Mike_Everley 0 2,104 03-30-2021, 11:43 AM
Last Post: Mike_Everley
Photo [XP] Real Time Day/Night Cycle System (in review for v.3.0) Pelip 2 5,339 06-15-2020, 12:21 PM
Last Post: Pelip
  [XP/VX] Equipment Skill System Someone 9 12,894 04-17-2019, 08:19 PM
Last Post: Someone
  Licence System - Upgrade your Character [XP] yamina-chan 2 8,298 05-03-2012, 05:26 PM
Last Post: yamina-chan
  [RPGMakerVX] Eventing a Cheat System or Cheat Tool. Kail 6 14,586 06-06-2011, 08:56 PM
Last Post: Kail



Users browsing this thread: 1 Guest(s)