Vehicle animation issue

eBuddy

Princess of Destiny
Member
Joined
Apr 17, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello!

I have made custom sprites for the ship so that it looks like my main character is swimming. I managed to make the "get on vehicle" smooth, so the vehicle and player don't show at the same time. The issue is when the player gets off the vehicle. The swimming player (vehicle sprite) is visible until the character makes it to shore and then disappears.
upload_2017-4-19_19-3-30.png
It seems the step animation from vehicle to land is somewhere in the javascrip, out of my noob hands. :kaodes:

At this time, I'm using a common event called "stop swimming", which is executed when the player steps on a terrain tile (first tiles on shore). This event removes the ship's sprite to none, but the step animation comes first..
upload_2017-4-19_19-5-11.png

Does anyone have a engine based solution? Or a simple code change edit?
:kaoswt2:
 

eBuddy

Princess of Destiny
Member
Joined
Apr 17, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Show us what you did for the getting ON vehicle.

This is the code that handles the player getting off the vehicle ...
Code:
Game_Player.prototype.getOffVehicle = function() {
    if (this.vehicle().isLandOk(this.x, this.y, this.direction())) {
        if (this.isInAirship()) {
            this.setDirection(2);
        }
        this._followers.synchronize(this.x, this.y, this.direction());
        this.vehicle().getOff();
        if (!this.isInAirship()) {
            this.forceMoveForward();
            this.setTransparent(false);
        }
        this._vehicleGettingOff = true;
        this.setMoveSpeed(4);
        this.setThrough(false);
        this.makeEncounterCount();
        this.gatherFollowers();
    }
    return this._vehicleGettingOff;
};
I think where the line this.setTransparent(false) is executed, if you also make the vehicle transparent at the same time, you won't see both at once. But you haven't shown what you've done to accomplish what you've got so far, so that's about all I can offer.
 

eBuddy

Princess of Destiny
Member
Joined
Apr 17, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
Your suggestion sounds super good! I suppose then I'd have to make it visible again at some other point in the code?

What I have, is a common event named "Flippers On" and it executes when the player uses the item.

upload_2017-5-1_0-5-52.png

It basically checks the direction which the player is facing, and then checks the tile in front of said direction. Then it summons an invisible ship so that I can display "getting into water" animation, without displaying them both simultaneously.

Secondly, I have "Flippers Off" common event tied to the ground tiles along the coast.

upload_2017-5-1_0-8-30.png

This, as seen in the post, removes the ship image completely to avoid duplicating the player graphics, but "getting back to land" walk animation plays before the player actually gets on land to activate this event. :kaodes:

So, instead of similarly telling the player to removes his flippers in order to get back on land (which could work), I wish I could follow the pokemon style; just walking back to land.

Can I just remove that this.forceMoveForward(); part?
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top