Character Walks Over The Vehicle

I have a bigger sprite for "airship" type of vehicle used in my game. The problem is that the character is able to walk on top of the vehicle while it's landed. This sprite is floating in the air even when landed. It should be as in tiles (star passability), so that the character would walk behind it. Would there be any easy fix on this one? I have no idea how to set up vehicle passabilities.
Are you using scripts for the airship? You said floating, how?
I'm using only the following snippet for the airship functionality. I don't think it's related to this problem, though. This snippet makes it so the airship shadow disappears when you're flying on the sky.

class Spriteset_Map
def update_shadow
#Put the terrain-tag numbers you want in this array to remove shadows.
shadowless = [5]

airship = $game_map.airship
@shadow_sprite.x = airship.screen_x
@shadow_sprite.y = airship.screen_y + airship.altitude
if shadowless.include? airship.terrain_tag
@shadow_sprite.opacity = 0
else
@shadow_sprite.opacity = airship.altitude * 8
end
@shadow_sprite.update
end
end



Here are some images for the demonstration of the problem I have. The Griffin is the airship.


1. This is how it looks like when you're "in" the airship and flying.
AS1_zpsgtjrvaip.png


2. In here, the griffin has landed, even though it's clearly still floating in the air. The spot where the player stands is where you enter the griffin "airship."
AS2_zpsux6k7rab.png


3. However, if you decide not to enter but instead walk towards the airship, the player sprite walks over it, instead of going behind it as it should. This is the problem.
AS3_zpsgqe84xqb.png
Ok. I remember the same thing happening in the game storm of spears.
I played with Game_Vehicle
Change line 159
@priority_type = 0 if @altitude == 1
shows below the first time then above after riding.
Ok. I remember the same thing happening in the game storm of spears.
I played with Game_Vehicle
Change line 159
@priority_type = 0 if @altitude == 1
shows below the first time then above after riding.
It does seem to work. However, the fact that it still shows the player above the griffin at the first time is bothering. Basically, it resets the thing every time I enter another area or load a new game. Hopefully someone could figure out something additional to solve this one.
I played some more. And it seems to work for me.
Set line 21 @altitude = 1
then down below
Code:
  def update_airship_altitude
    if @driving
      @altitude += 1 if @altitude < max_altitude && takeoff_ok?
    elsif @altitude > 0
      @altitude -= 1
      @priority_type = 0 if @altitude == 1
    else
      @altitude += 1 if @altitude < max_altitude
    end
    @step_anime = (@altitude == max_altitude)
    @priority_type = 2 if @altitude > 0
  end
I played some more. And it seems to work for me.
Set line 21 @altitude = 1
then down below
Code:
  def update_airship_altitude
    if @driving
      @altitude += 1 if @altitude < max_altitude && takeoff_ok?
    elsif @altitude > 0
      @altitude -= 1
      @priority_type = 0 if @altitude == 1
    else
      @altitude += 1 if @altitude < max_altitude
    end
    @step_anime = (@altitude == max_altitude)
    @priority_type = 2 if @altitude > 0
  end
It works for the problem, however another problem seems to emerge. Now, the griffin sprite shakes in a super high speed when it's stationary on the landed position 😳
I noticed a small shake for me. But looking at it again it is moving very fast. That's cause the canges are not perfect. It's constantly changing between altitude 1 and 0.
I'll play with it some more.
I noticed a small shake for me. I took it to be the action when its idle while flying. Do you have animation lag scripts? or other lag scripts?
Yeah, I'm using three different anti lag scrips. Removing them doesn't seem to do anything for the shaking, though.

In your modification, it seems its possible to increase the shaking by altering the number in the following part. I changed it to 4 and the shaking gets a lot more visible.

else
@altitude += 1 if @altitude < max_altitude
I finally got it. It only needed one part changed from the original. Put your script back to the original then change
@step_anime = (@altitude == max_altitude)
-> @priority_type = 2 if @altitude < 2
I finally got it. It only needed one part changed from the original. Put your script back to the original then change
@step_anime = (@altitude == max_altitude)
-> @priority_type = 2 if @altitude < 2
It's finally working! Thank you so much for the help 🙂 I tend to get impatient trying to fix stuff like this, so I really appreciate this.
I'm resurrecting this thread. It would seem that the solution offered before also makes the character freeze when the the player leaves the normal ship vehicle. This problem emerged when I started a new game.
So, this one's still unsolved -.-

Original thread: https://forums.rpgmakerweb.com/threads/character-walks-over-the-vehicle.78218/