Making vehicle graphic change when riding

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
Hi,

I'd like to have a dragon sprite serve as a vehicle. When not riding the vehicle, the vehicle graphic is a dragon. But when I do ride the vehicle, I can see the hero sprite riding the dragon.

I'm not seeing any existing scripts for this so far, and I'm not seeing a way to do this via eventing, but thought I'd check to see if anyone else is aware of a way to do this.

Thanks!
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,377
Reaction score
8,536
First Language
English
Primarily Uses
RMMV

I've moved this thread to Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.


If you are not using Ace please let me know.

edit: I moved here, rather than script requests, because I didn't think you needed a script. You can change the vehicle graphic in event commands, but now that I look, that may also effect the vehicle type, and I feel like the different vehicle types can't all travel over the same types of tiles.

I think this will best be left here and if it turns out a script is needed, then we can move it to script requests.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
The way to do this is with one event that pretends it's the vehicle, so you can run some extra commands before putting the player on the real vehicle, coupled with a second parallel process event that monitors for the player leaving the vehicle, which can then run some extra commands when that happens. Come to think of it, you could probably have a single event with two pages.

First, put the real vehicle (dragon with rider sprite) onto a map that the player will never visit.

Next, create an event on whatever map will have the dragon, and this will be the "bogus" vehicle.

Page 1 looks like the dragon without rider. Trigger action button. THROUGH ON. Event commands:
- Gather Followers
- Make the player transparent (now, if this ends up making the vehicle itself transparent at the end, go with a Change Player Sprites to None for all characters instead)
- Set Vehicle Location - change the real vehicle's location to the same map, X and Y as the current event - probably use variables to do this, if you're going to allow the player to land anywhere and use the vehicle again afterwards
- Get On Vehicle
- Turn on Self Switch A

Page 2 is set to parallel process and has no sprite. Event commands:
- Wait 1 Frame
- If Vehicle (Dragon) is being ridden
- ... Get Off Vehicle
- ... Set Event Location (move the event to the vehicle's new location - probably have to use variables again)
- ... Set Vehicle Location - put the vehicle back on its original map where the player will never visit
- ... Turn off player transparency
- ... Turn off Self Switch A


So what you have is an event that looks like a dragon. When you walk onto it, followers are gathered, the player mounts the dragon (this is the combination of changing the player visibility/sprites, moving the vehicle, entering the vehicle and changing the active event page), and gains control of the vehicle. When the exit the vehicle, the player dismounts (again the combination of moving the event to the player's location, making it visible, exiting the vehicle, hiding it, and making the player visible again).

You may have to play around with the sequencing a bit if you end up with some funny stuff happening, like seeing both versions of the dragon or the player. Just make sure you get on the vehicle AFTER setting its new location, and getting OFF before moving it away. And you would not be able to transfer to other maps while on the vehicle - movement is restricted to just the one map.
 

Hammerklavier

Veteran
Veteran
Joined
Dec 28, 2013
Messages
45
Reaction score
4
First Language
English
Primarily Uses
Thanks Shaz! I'll give that a shot.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top