Land vehicles?

Snarkyfork

Veteran
Veteran
Joined
Oct 29, 2015
Messages
313
Reaction score
32
First Language
English
Primarily Uses
What is a good script or method for making a land vehicle (or two)? I am currently trying to create a "mine cart" for a dungeon.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Actually since you can walk on land terrain you don't need a vehicle. You could just use the Change Graphic command to change actor sprite when interacting with the cart. You could also allow the player to walk only on the railway using a different tileset where only railroad is passable. Just to be more clear:

  • create two (2) different tilesets, a normal tileset for the mine and a special tileset with the same files you used for the mine but where only railways are passable.
  • make an event with the mine cart graphic that the player can activate using action button
  • when the event is activated place the caracter sprite on it and change it to the one you want to use for the vehicle. (Of course disable player followers as well).
This way you will have a simple cart that can be used by the player. Now is up to you how to handle the stop. I see two different options:

  1. Make a fixed stop where the player can interact with an object to change its graphic and move on the ground (the object needs to be very close to the railway or the player won't be able to interact with it...unless you use an appropriate tileset which allows the player to interact with distant objects).
  2. Make a parallel process that changes player graphic when a specific button is pressed. (The event should do it ONLY when the player is using the cart graphic).
Both are fine but you should remember that when the player "dismounts" the cart (is set back to its original graphic) this means the cart should appear at the player current position. To do it you need the "dismount" event to store playerX and playerY into variables and to transfer the cart event there or the player won't be abe to use it again.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.


Please search before you post requests - I believe there are a number of scripts available to do this.


Also, are you actually using VX Ace? Because that's the forum you posted in. You need to be specific about what engine you're using because the scripts are completely different.
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
A railway mine cart can be done both using only eventing or have everything fully controlled by a script.

For eventing, all you need is to change the character sprite to one with cart and force move route to get the cart move on the rail to the end destination then change the character sprite back.

For script, one that works require you to set the tile passage (4dir) on the rails and a few script calls on the cart.

Click for demo Link, script is inside the demo.

Both eventing and script has their share load of work so i can't say which one's better.

Script require you to set up tons of stuffs in the start but allows automated cart moving on the rail.

Eventing is easier to understand but will need some work on the move route setting, especially when you have a long long rail.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top