How to disable the airships landing animation when entering airships interior?
Currently when pressing assigned button (Q) when on board the airship it makes the landing animation (altitude change) and then the interior map loads. I want the airship to remain hovering in the air because of the "interior" map. "Interior map" would start from the deck of the airship and "taking off" would be when interacting with the steering wheel. It looks stupid if the airship makes landing animation but the interior map shows you are in the air. Making "interior map" look like you are actually landed is also out of the question because of the different lands in the world map (desert, snow, plains, forest etc) thus making one map that suits all of the world maps environments can't be done. In example you enter the interior when you are above desert, it shows the landing animation but the interior map shows you are landed in a forest.
One method of solving this could be making the button press to switch switch X on. When switch X is on game_vehicle doesn't do the altitude change when getting off the airship. When leaving the interior map the switch would be turned off again.
Vehicle Interior script
Game_vehicle script
EDIT: Not sure if in the correct part of the forums, admins move this thread if needed 🙂
Currently when pressing assigned button (Q) when on board the airship it makes the landing animation (altitude change) and then the interior map loads. I want the airship to remain hovering in the air because of the "interior" map. "Interior map" would start from the deck of the airship and "taking off" would be when interacting with the steering wheel. It looks stupid if the airship makes landing animation but the interior map shows you are in the air. Making "interior map" look like you are actually landed is also out of the question because of the different lands in the world map (desert, snow, plains, forest etc) thus making one map that suits all of the world maps environments can't be done. In example you enter the interior when you are above desert, it shows the landing animation but the interior map shows you are landed in a forest.
One method of solving this could be making the button press to switch switch X on. When switch X is on game_vehicle doesn't do the altitude change when getting off the airship. When leaving the interior map the switch would be turned off again.
Vehicle Interior script
=beginCSCA Vehicle Interiors!Created by: Casper Gaming (http://www.caspergaming.com/)Compatibility:Made for RPGVXAceIMPORTANT: ALL CSCA Scripts should be compatible with each other unlessotherwise noted.UPDATESVersion 1.1-Fixed bug of map bgm playing very briefly before and after vehicle transfer.-Fixed bug of CSCA Menu Theme conflicting with map bgm playing after off vehicle.FFEATURES:This script will allow you to press a button and be transferred to the interiorof a vehicle if you're currently riding that vehicle. Only Ship & Airship aresupported. To return to the exterior of the vehicle, all you need to do iscall the following script in an event: $game_player.csca_returnHow to use these features is explained below in the setup section.SETUP BELOW IS REQUIRED!CREDIT:Free to use in noncommercial games if credit is given to:Casper Gaming (http://www.caspergaming.com/)To use in a commercial game, please purchase a license here:http://www.caspergaming.com/licenses.htmlTERMS:http://www.caspergaming.com/terms_of_use.html=endmodule CSCA_VEHICLE_TRANSFERS # Don't Touch ######### # SETUP # ######### SMAPID = 32 # Map ID of the map that contains the interior of the ship. SXCOORD = 15 # X coordinate you want the player to appear on the Ship Interior. SYCOORD = 0 # Y coordinate you want the player to appear on the Ship Interior. SDIRECTION = 2 # Direction you want the player facing after transfer to the # Ship Interior. 2 = down, 4 = left, 6 = right, 8 = up SFADE = 0 # 0 = black fade, 1 = white fade, 2 = no fade AMAPID = 32 # Map ID of the map that contains the interior of the airship. AXCOORD = 15 # X coordinate you want the player to appear on the Airship # Interior. AYCOORD = 0 # Y coordinate you want the player to appear on the Airship # Interior. ADIRECTION = 2 # Direction you want the player facing after transfer to the # Airship Interior. 2 = down, 4 = left, 6 = right, 8 = up AFADE = 0 # 0 = black fade, 1 = white fade, 2 = no fade TRIGGER = :L # Button you wish to start the transfer to the interior map of a # vehicle. Keep in mind the default "L" button is actually "Q" on # the keyboard. ############# # SETUP END # ############# end # Don't touch this or anything belowclass Game_Player < Game_Character include CSCA_VEHICLE_TRANSFERS attr_reader :bgm_no_play alias csca_gp_update update def update csca_gp_update csca_vehicle_transfer_input end def csca_vehicle_transfer_input if Input.trigger?(TRIGGER) if in_ship? @cscavehiclereturn = :ship reserve_transfer(SMAPID, SXCOORD, SYCOORD, SDIRECTION) $game_temp.fade_type = SFADE csca_vehicle_remove elsif in_airship? @cscavehiclereturn = :airship reserve_transfer(AMAPID, AXCOORD, AYCOORD, ADIRECTION) $game_temp.fade_type = AFADE csca_vehicle_remove end end end def csca_vehicle_remove @cscavehicletransfermap = $game_map.map_id @cscavehicletransferx = @x @cscavehicletransfery = @y @cscavehicletransferdirection = @direction @cscavehicleinterior = true @followers.synchronize(@x, @y, @direction) @vehicle_getting_off = true vehicle.get_off @move_speed = 4.1 @through = false @followers.gather @vehicle_getting_off set_bgm_no_play(true) make_encounter_count end def csca_return map_id = @cscavehicletransfermap x = @cscavehicletransferx y = @cscavehicletransfery direction = @cscavehicletransferdirection @transparent = true reserve_transfer(map_id, x, y, direction) $game_temp.fade_type = 0 @vehicle_type = :ship if @cscavehiclereturn == :ship @vehicle_type = :airship if @cscavehiclereturn == :airship @vehicle_getting_on = true @followers.gather @vehicle_getting_on @cscavehicleinterior = false end def csca_vehicle_transfer? @cscavehicleinterior end def set_bgm_no_play(tf) @bgm_no_play = tf end endclass Game_Map alias csca_vi_autoplay autoplay def autoplay if !$game_player.bgm_no_play || map_id == CSCA_VEHICLE_TRANSFERS::AMAPID || map_id == CSCA_VEHICLE_TRANSFERS::SMAPID csca_vi_autoplay else $game_player.set_bgm_no_play(false) end endendclass Game_Vehicle < Game_Character alias csca_vi_get_off get_off def get_off if $game_player.csca_vehicle_transfer? @driving = false @walk_anime = false @step_anime = false @direction = 4 else csca_vi_get_off $game_map.autoplay end endend
#==============================================================================# ** Game_Vehicle#------------------------------------------------------------------------------# This class handles vehicles. It's used within the Game_Map class. If there# are no vehicles on the current map, the coordinates are set to (-1,-1).#==============================================================================class Game_Vehicle < Game_Character #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :altitude # altitude (for airships) attr_reader :driving # driving flag #-------------------------------------------------------------------------- # * Object Initialization # type: vehicle type 🙂boat, :ship, :airship) #-------------------------------------------------------------------------- def initialize(type) super() @type = type @altitude = 0 @driving = false @direction = 4 @walk_anime = false @step_anime = false @walking_bgm = nil init_move_speed load_system_settings end #-------------------------------------------------------------------------- # * Initialize Move Speed #-------------------------------------------------------------------------- def init_move_speed @move_speed = 5 if @type == :boat @move_speed = 5.2 if @type == :ship @move_speed = 5.7 if @type == :airship end #-------------------------------------------------------------------------- # * Get System Settings #-------------------------------------------------------------------------- def system_vehicle return $data_system.boat if @type == :boat return $data_system.ship if @type == :ship return $data_system.airship if @type == :airship return nil end #-------------------------------------------------------------------------- # * Load System Settings #-------------------------------------------------------------------------- def load_system_settings @map_id = system_vehicle.start_map_id @x = system_vehicle.start_x @y = system_vehicle.start_y @character_name = system_vehicle.character_name @character_index = system_vehicle.character_index end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if @driving @map_id = $game_map.map_id sync_with_player elsif @map_id == $game_map.map_id moveto(@x, @y) end if @type == :airship @priority_type = @driving ? 2 : 0 else @priority_type = 1 end @walk_anime = @step_anime = @driving end #-------------------------------------------------------------------------- # * Change Position #-------------------------------------------------------------------------- def set_location(map_id, x, y) @map_id = map_id @x = x @y = y refresh end #-------------------------------------------------------------------------- # * Determine Coordinate Match #-------------------------------------------------------------------------- def pos?(x, y) @map_id == $game_map.map_id && super(x, y) end #-------------------------------------------------------------------------- # * Determine Transparency #-------------------------------------------------------------------------- def transparent @map_id != $game_map.map_id || super end #-------------------------------------------------------------------------- # * Board Vehicle #-------------------------------------------------------------------------- def get_on @driving = true @walk_anime = true @step_anime = true @walking_bgm = RPG::BGM.last system_vehicle.bgm.play $game_map.ms_ecam_str = 7.0 end #-------------------------------------------------------------------------- # * Get Off Vehicle #-------------------------------------------------------------------------- def get_off @driving = false @walk_anime = false @step_anime = false @direction = 4 @walking_bgm.play $game_map.ms_ecam_str = 15.0 end #-------------------------------------------------------------------------- # * Synchronize With Player #-------------------------------------------------------------------------- def sync_with_player @x = $game_player.x @y = $game_player.y @real_x = $game_player.real_x @real_y = $game_player.real_y @direction = $game_player.direction update_bush_depth end #-------------------------------------------------------------------------- # * Get Move Speed #-------------------------------------------------------------------------- def speed @move_speed end #-------------------------------------------------------------------------- # * Get Screen Y-Coordinates #-------------------------------------------------------------------------- def screen_y super - altitude end #-------------------------------------------------------------------------- # * Determine if Movement is Possible #-------------------------------------------------------------------------- def movable? !moving? && !(@type == :airship && @altitude < max_altitude) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_airship_altitude if @type == :airship end #-------------------------------------------------------------------------- # * Update Airship Altitude #-------------------------------------------------------------------------- def update_airship_altitude if @driving @altitude += 1 if @altitude < max_altitude && takeoff_ok? elsif @altitude > 0 @altitude -= 1 @priority_type = 0 if @altitude == 0 end @step_anime = (@altitude == max_altitude) @priority_type = 2 if @altitude > 0 end #-------------------------------------------------------------------------- # * Get Maximum Altitude of Airship #-------------------------------------------------------------------------- def max_altitude return 32 end #-------------------------------------------------------------------------- # * Determine if Takeoff Is Possible #-------------------------------------------------------------------------- def takeoff_ok? $game_player.followers.gather? end #-------------------------------------------------------------------------- # * Determine if Docking/Landing Is Possible # d: Direction (2,4,6,8) #-------------------------------------------------------------------------- def land_ok?(x, y, d) if @type == :airship return false unless $game_map.airship_land_ok?(x, y) return false unless $game_map.events_xy(x, y).empty? else x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) return false unless $game_map.valid?(x2, y2) return false unless $game_map.passable?(x2, y2, reverse_dir(d)) return false if collide_with_characters?(x2, y2) end return true endend