I found out my ship only sails through land, it gets stuck in the water.
I also found out when I delete this passibility script the boat sails like normal, does anyone know what I can do to modify the script so the vehicles are an exception? xD
It was french script so I put in google translator, hope it still works :P
#================================================= ==============================
#
#
# Passabilité edge V1.2
#
#
#================================================= ==============================
#
# On the brainchild of Ashka.
# Rpg-maker-vx.bactif.com
#
# Vincentmhd.
# Http://vincentmhdmaker.canalblog.com/
#
31/08/2009 #
#
#===================================== =========== NOTE ===========================
#
#
#------------------------------------------------- ------------------------------
#
# This script will make passibility contours. Thus each side
# A tile can have a passabilité own. This can be useful for
# Borders, barriers.
#
# Unlike the script Ashka, these changes along
# Run, although it is quite possible to modify the event in passabilités.
#
# On auto-tiles, their passabilités change to their borders
# Respectively, but the interior remains subject to the passabilité of the publisher.
# To change a tile or tile-self is like the script Ashka,
# To the difference in return bool 4 for 4 directions.
The # bool may be substituted with 0 to 1 for true and false if
# You do not have space on a line. (This will surely be the case ^ ^)
# This is the command:
#
# Change_passage (file, x, y, down, left, right, up)
#
# It is also possible to change the passabilité of events.
# To do this just comment out the report, for example:
#
# "P FTTT"
#
# PASSABILITY is mandatory that allows the script to recognize a change
# Of passabilité.
# Do not forget the space!
# F and T is false to true, if they inform the character
# Can pass in the four directions: down, left, right and up.
# It is relatively easy to use.
#
#
# Bon Vincentmhd making ...
#
#------------------------------------------------- ------------------------------
Game_Character class
# Add special passabilité
attr_accessor: p
initialize alias mhd_initialize
def initialize
mhd_initialize
@ P = []
end
#------------------------------------------------- -------------------------
#
# Function original collision
#
#------------------------------------------------- -------------------------
mhd_collide_with_characters alias? collide_with_characters?
def collide_n (x, y)
mhd_collide_with_characters? (x, y)
end
#------------------------------------------------- -------------------------
#
# Function customized
#
#------------------------------------------------- -------------------------
# It returns if collision (unlike the passabilité)
def collide_c (x, y, direction)
for event in $ game_map.events_xy (x, y) # Matches event position
UNLESS event.through Passage # OFF?
event.p.size if> # 2 if it is customized
return! event.p [direction]
end
return true if 1 # == event.priority_type TARGET IS normal char
end
end
if @ # 1 == priority_type Self IS normal char
if $ game_player.pos_nt? (x, y) position player # Matches
event.p.size if> # 2 if it is customized
return! event.p [direction]
else
return true
end
end
if $ game_map.boat.pos_nt? (x, y) position player # Matches
event.p.size if> # 2 if it is customized
return! event.p [direction]
else
return true
end
end
if $ game_map.ship.pos_nt? (x, y) position player # Matches
event.p.size if> # 2 if it is customized
return! event.p [direction]
else
return true
end
end
end
return false
end
#------------------------------------------------- -------------------------
#
# Mix the two versions
#
#------------------------------------------------- -------------------------
def collide_with_characters? (xb, yb, xa, ya)
bcustom = false
acustom = false
# Determination if necessary to customize
for event in $ game_map.events_xy (xb, yb)
if event.p.size> 3
bcustom = true
end
end
for event in $ game_map.events_xy (xa, ya)
if event.p.size> 3
acustom = true
end
end
# If necessary customization for different traffic
if (acustom | | bcustom)
dx = xa-xb
dy = ya - yb
if (dy == -1)
a = 0
b = 3
end
if (dx == 1)
a = 1
b = 2
end
if (dx == -1)
a = 2
b = 1
end
if (dy == 1)
a = 3
b = 0
end
end
if (bcustom == false)
BPass collide_n = (xb, yb)
else
BPass collide_c = (xb, yb, b)
end
if (acustom == false)
APASS collide_n = (xa, ya)
else
APASS collide_c = (xa, ya, a)
end
if (acustom == true) & & (bcustom == false) & & (APASS == true)
return APASS
else
return (& & APASS BPass)
end
end
#------------------------------------------------- -------------------------
# * Determine if Fair
# X: x-coordinate
# Y: y-coordinate
#------------------------------------------------- -------------------------
def passable? (xb, yb, x = @ x = @ y ago)
x = $ game_map.round_x (xb) # Horizontal loop adj.
game_map.round_y $ y = (yb) # loop Vertical adj.
return false unless $ game_map.valid? (xb, yb) # Outside map?
return true if @ debug_through-through gold? Through # ON?
return false unless $ game_map.passable? (xb, yb, xa, ya) # Map impasse?
return false if collide_with_characters? (xb, yb, xa, ya) # Collide with character?
# return true Fair
end
end
#==================================== Game_Map ============ =======================
#
#------------------------------------------------- ------------------------------
#
# We're going to tile the tile A to B. The principle is the same as for the script
# Original. An ash contains exceptions passabilité you want.
#
#------------------------------------------------- ------------------------------
Game_Map class
Table # exception passabilité
attr_accessor: tab_passage
# Read data from the map
attr_reader: map
initialize alias mhd_initialize
def initialize
mhd_initialize
@ Tab_passage = {663 => [false, true, true, true]}
end
def boat_passable? (x, y)
return ok? (x, y, x, y, 0x02)
end
#------------------------------------------------- -------------------------
# * Determine if Ship IS Fair
# X: x-coordinate
# Y: y-coordinate
#------------------------------------------------- -------------------------
def ship_passable? (x, y)
return ok? (x, y, x, y, 0x04)
end
#------------------------------------------------- -------------------------
# * Determine if Cdn Airship Land
# X: x-coordinate
# Y: y-coordinate
#------------------------------------------------- -------------------------
def airship_land_ok? (x, y)
return ok? (x, y, x, y, 0x08)
end
#------------------------------------------------- -------------------------
#
# We always need the old passabilité
#
#------------------------------------------------- -------------------------
mhd_passable alias? Fair?
def normal_p (x, y, flag = 0x01)
mhd_passable? (x, y, flag)
end
#------------------------------------------------- -------------------------
#
# Create our passabilité
#
#------------------------------------------------- -------------------------
def custom_p (x, y, direction, flag = 0x01)
events_xy for event in (x, y) # matching events with coordinates
next if event.tile_id == 0 # tiled graphics are not
# next if event.through pass-through state
event.p.size if> # 2 if it is customized premium on any
return p [direction]
end
next if event.priority_type> 0 # not [Below characters]
pass = @ passages [event.tile_id] # get attribute fair
next if pass == 0x10 & 0x10 # *: Does not affect transition
return true if flag == 0x00 & pass # o: Fair
return false if flag == flag pass & # x: Impasse
end
for i in [2, 1, 0] # in order from on top of layer
tile_id map.data @ = [x, y, i] # get tile ID
return false if tile_id == nil # failed to get tile: Impasse
pass = @ passages [tile_id] # get attribute fair
if (@ tab_passage.key? (tile_id)) #
return @ tab_passage [tile_id] [direction]
end
next if pass == 0x10 & 0x10 # *: Does not affect transition
return true if flag == 0x00 & pass # o: Fair
return false if flag == flag pass & # x: Impasse
end
end
# Redefinition of the method that controls the passabilité
#------------------------------------------------- -------------------------
#
# Mix of both!
#
#------------------------------------------------- -------------------------
def passable? (xb, yb, xa, ya, flag = 0x01)
bcustom = false
acustom = false
# Determination if necessary to customize
for event in events_xy (xb, yb)
if event.p.size> 3
bcustom = true
end
end
for event in events_xy (xa, ya)
if event.p.size> 3
acustom = true
end
end
for i in [2, 1, 0]
tileB_id map.data @ = [xb, yb, i]
if (@ tab_passage.key? (tileB_id))
bcustom = true
end
end
for i in [2, 1, 0]
tileA_id map.data @ = [xa, ya, i]
if (@ tab_passage.key? (tileA_id))
acustom = true
end
end
# If necessary customization for different traffic
if (acustom | | bcustom)
dx = xa-xb
dy = ya - yb
if (dy == -1)
a = 0
b = 3
end
if (dx == 1)
a = 1
b = 2
end
if (dx == -1)
a = 2
b = 1
end
if (dy == 1)
a = 3 b = 0
end
end
if (bcustom == false)
BPass normal_p = (xb, yb, flag)
else
BPass custom_p = (xb, yb, b, flag)
end
if (acustom == false)
APASS normal_p = (xa, ya, flag)
else
APASS custom_p = (xa, ya, a, flag)
end
return (& & APASS BPass)
end
#------------------------------------------------- -------------------------
#
# Upgrade the passabilités
#
#------------------------------------------------- -------------------------
alias mhd_setup_events setup_events
def setup_events
mhd_setup_events
setup_pass
end
def setup_pass
for event in $ game_map.events.values
next if event.list == nil
for i in 0 ... event.list.size
if event.list [i]. code == 108
a = ""
event.list a = [i]. parameters.to_s
if a [0,1] == "P"
line = ""
line = event.list [i]. parameters.to_s
for i in 0 ... 4
info = ""
Online info = [(2 + i), 1]
if info == "T"
event.p [i] = true
else
event.p [i] = false
end
end
end
end
end
end
end
end
#------------------------------------------------- -------------------------
#
# Resume Ashka almost as
# Yet to the contours of autotiles, there is a small addition
# I have analyzed only one autotiles, so I hope they
# All the same shape otherwise it would Balaud ...
#
#------------------------------------------------- -------------------------
Game_Interpreter class
def autotiles (min, down, left, right, up)
$ Game_map.tab_passage [min + 16] = [true, left, true, true]
$ Game_map.tab_passage [min + 17] = [true, left, true, true]
$ Game_map.tab_passage [min + 18] = [true, left, true, true]
$ Game_map.tab_passage [min + 19] = [true, left, true, true]
$ Game_map.tab_passage [min + 20] = [true, true, true, up]
$ Game_map.tab_passage [min + 21] = [true, true, true, up]
$ Game_map.tab_passage [min + 22] = [true, true, true, up]
$ Game_map.tab_passage [min + 23] = [true, true, true, up]
$ Game_map.tab_passage [min + 24] = [true, true, right, true]
$ Game_map.tab_passage [min + 25] = [true, true, right, true]
$ Game_map.tab_passage [min + 26] = [true, true, right, true]
$ Game_map.tab_passage [min + 27] = [true, true, right, true]
$ Game_map.tab_passage [min + 28] = [down, true, true, true]
$ Game_map.tab_passage [min + 29] = [down, true, true, true]
$ Game_map.tab_passage [min + 30] = [down, true, true, true]
$ Game_map.tab_passage [min + 31] = [down, true, true, true]
$ Game_map.tab_passage [min + 32] = [true, left, right, true]
$ Game_map.tab_passage [min + 33] = [down, true, true, up]
$ Game_map.tab_passage [min + 34] = [true, left, true, up]
$ Game_map.tab_passage [min + 35] = [true, left, true, up]
$ Game_map.tab_passage [min + 36] = [true, true, right, up]
$ Game_map.tab_passage [min + 37] = [true, true, right, up]
$ Game_map.tab_passage [min + 38] = [down, true, right, true]
$ Game_map.tab_passage [min + 39] = [down, true, right, true]
$ Game_map.tab_passage [min + 40] = [down, left, true, true]
$ Game_map.tab_passage [min + 41] = [down, left, true, true]
$ Game_map.tab_passage [min + 42] = [true, left, right, up]
$ Game_map.tab_passage [min + 43] = [down, left, true, up]
$ Game_map.tab_passage [min + 44] = [down, left, right, true]
$ Game_map.tab_passage [min + 45] = [down, true, right, up]
$ Game_map.tab_passage [min + 46] = [down, left, right, up]
end
def change_passage (file, x, y, down, left, right, up)
down if a ==
down = false
else
down = true
end
if left == 1
left = false
else
left = true
end
if right == 1
right = false
else
right = true
end
if up == 1
up = false
else
up = true
end
box file
when "A1"
min = 2048 + (((y * 8) + x) * 48)
max = min + 47
autotiles (min, down, left, right, up)
when "A2"
min = 2816 + (((y * 8) + x) * 48)
max = min + 47
autotiles (min, down, left, right, up)
when "A3"
min = 4352 + (((y * 8) + x) * 48)
max = min + 47
autotiles (min, down, left, right, up)
when "A4"
min = 5888 + (((y * 8) + x) * 48)
max = min + 47
autotiles (min, down, left, right, up)
when "A5"
min = 1536 + ((y * 8) + x)
max = min + 1
for tile_id in min ... max
$ Game_map.tab_passage [tile_id] = [down, left, right, up]
end
when "B"
min = 0 + ((y * 8) + x)
max = min + 1
for tile_id in min ... max
$ Game_map.tab_passage [tile_id] = [down, left, right, up]
end
when "C"
min = 256 + ((y * 8) + x)
max = min + 1
for tile_id in min ... max
$ Game_map.tab_passage [tile_id] = [down, left, right, up]
end
when "D"
min = 512 + ((y * 8) + x)
max = min + 1
for tile_id in min ... max
$ Game_map.tab_passage [tile_id] = [down, left, right, up]
end
when "E"
min = 768 + ((y * 8) + x)
max = min + 1
for tile_id in min ... max
$ Game_map.tab_passage [tile_id] = [down, left, right, up]
end
end
end
end
#================================================= =============================
#
# Changes the notion of whether a key is pressed ...
#
#================================================= =============================
Game_Player class
def check_event_trigger_here (triggers)
return false if $ game_map.interpreter.running?
result = false
for event in $ game_map.events_xy (@ x, @ y)
if triggers.include? (event.trigger) # here we include also change if the priority is 1
event.start
result = true if event.starting
end
end
return result
end
end
Definitely doesn't still work. Just give us the script as it was; I'd rather have comments I can't understand than corrupted code and, anyway, I can read French.
#===============================================================================
#
#
# Passabilité de contours V1.2
#
#
#===============================================================================
#
#Sur une idée originale d'Ashka.
#rpg-maker-vx.bactif.com
#
#Vincentmhd.
#http://vincentmhdmaker.canalblog.com/
#
#31/08/2009
#
#=====================================NOTE======================================
#
#
#-------------------------------------------------------------------------------
#
#Ce script permet de réaliser des passibilités de contours. Ainsi chaque côté
#d'un tile peut avoir une passabilité propre. Ce peut être utile pour des
#bordures, des barrières.
#
#Contrairement au script d'Ashka, il s'agit de modifications sur le long
#terme, même s'il est tout à fait possible de modifier les passabilités en event.
#
#Concernant les auto-tiles, leurs passabilités changent a leur bordures
#respectives, mais l'intérieur reste soumis à la passabilité de l'éditeur.
#Pour modifier un tile ou auto-tile, c'est comme dans le script d'Ashka,
#à la difference qu'il y a 4 bool à rentrer, pour les 4 directions.
#Les bools peuvent être substitué par de 0 pour true et 1 pour false si
#vous n'avez pas la place sur une ligne. (Ce qui sera sûrement le cas ^^)
#Voilà la commande:
#
#change_passage(fichier, x, y, down, left, right,up)
#
#Il est aussi possible de modifier la passabilité des events.
#Pour se faire il suffit de le signaler en commentaire, par exemple:
#
#"P FTTT"
#
#PASSABILITY est obligatoire cela permet au script de reconnaitre une modification
#de passabilité.
#N'oubliez pas l'espace!!
#F correspond à false et T à true, ils informent si le personnage
#peut passer selon les quatre directions: bas, gauche, droite et haut.
#c'est relativement simple à utiliser.
#
#
#Bon making Vincentmhd...
#
#-------------------------------------------------------------------------------
class Game_Character
#ajout de passabilité particulière
attr_accessor :p
alias mhd_initialize initialize
def initialize
mhd_initialize
@p = []
end
#--------------------------------------------------------------------------
#
# Fonction originelle de collision
#
#--------------------------------------------------------------------------
alias mhd_collide_with_characters? collide_with_characters?
def collide_n (x,y)
mhd_collide_with_characters?(x, y)
end
#--------------------------------------------------------------------------
#
# Fonction customisé
#
#--------------------------------------------------------------------------
#On renvoit s'il y a collision (l'inverse de la passabilité)
def collide_c(x,y, direction)
for event in $game_map.events_xy(x, y) # Matches event position
unless event.through # Passage OFF?
if event.p.size > 2 # s'il est customisé
return !event.p[direction]
end
return true if event.priority_type == 1 # Target is normal char
end
end
if @priority_type == 1 # Self is normal char
if $game_player.pos_nt?(x, y) # Matches player position
if event.p.size > 2 # s'il est customisé
return !event.p[direction]
else
return true
end
end
if $game_map.boat.pos_nt?(x, y) # Matches player position
if event.p.size > 2 # s'il est customisé
return !event.p[direction]
else
return true
end
end
if $game_map.ship.pos_nt?(x, y) # Matches player position
if event.p.size > 2 # s'il est customisé
return !event.p[direction]
else
return true
end
end
end
return false
end
#-------------------------------------------------------------------------- #
# Mix des deux versions
#
#--------------------------------------------------------------------------
def collide_with_characters?(xb, yb, xa, ya)
bcustom = false
acustom = false
#determination si besoin de customiser
for event in $game_map.events_xy(xb, yb)
if event.p.size > 3
bcustom = true
end end
for event in $game_map.events_xy(xa, ya)
if event.p.size > 3
acustom = true
end
end
#Si customisation besoin du sens de circulation
if (acustom || bcustom)
dx = xa -xb
dy = ya - yb
if(dy == -1)
a = 0
b = 3
end
if (dx == 1)
a = 1
b = 2
end
if (dx == -1)
a = 2
b = 1
end
if (dy == 1)
a = 3
b = 0
end
end
if (bcustom == false)
bpass = collide_n (xb, yb)
else
bpass = collide_c (xb, yb, b)
end
if (acustom == false)
apass = collide_n (xa, ya)
else
apass = collide_c (xa, ya, a)
end
if(acustom == true) && (bcustom == false) && (apass == true)
return apass
else
return (apass && bpass)
end
end
#--------------------------------------------------------------------------
# * Determine if Passable
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def passable?(xb, yb, xa = @x, ya = @y)
x = $game_map.round_x(xb) # Horizontal loop adj.
y = $game_map.round_y(yb) # Vertical loop adj.
return false unless $game_map.valid?(xb, yb) # Outside map?
return true if @through or debug_through? # Through ON?
return false unless $game_map.passable?(xb,yb, xa, ya) # Map Impassable?
return false if collide_with_characters?(xb, yb, xa, ya) # Collide with character?
return true # Passable
end
end
#====================================Game_Map===================================
#
#-------------------------------------------------------------------------------
#
#On va du tile A vers le tile B. Le principe est le même que pour le script
#originel. Un ash contient les exceptions de passabilité que vous voulez.
#
#-------------------------------------------------------------------------------
class Game_Map
#Tableau d'exception de passabilité
attr_accessor :tab_passage
#Lecture des données de la map
attr_reader :map
alias mhd_initialize initialize
def initialize
mhd_initialize
@tab_passage = {663=>[false,true,true,true]}
end
def boat_passable?(x, y)
return passable?(x, y, x, y, 0x02)
end
#--------------------------------------------------------------------------
# * Determine if Ship is Passable
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def ship_passable?(x, y)
return passable?(x, y, x, y, 0x04)
end
#--------------------------------------------------------------------------
# * Determine if Airship can Land
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def airship_land_ok?(x, y)
return passable?(x, y, x, y, 0x08)
end
#--------------------------------------------------------------------------
#
# On a toujours besoin de l'ancienne passabilité
#
#--------------------------------------------------------------------------
alias mhd_passable? passable?
def normal_p (x, y, flag = 0x01)
mhd_passable?( x, y, flag)
end
#--------------------------------------------------------------------------
#
# création de notre passabilité
#
#--------------------------------------------------------------------------
def custom_p (x, y, direction, flag = 0x01) for event in events_xy(x, y) # events with matching coordinates
next if event.tile_id == 0 # graphics are not tiled
next if event.through # pass-through state
if event.p.size > 2 # s'il est customisé prime sur tout
return p[direction]
end
next if event.priority_type > 0 # not [Below characters]
pass = @passages[event.tile_id] # get passable attribute
next if pass & 0x10 == 0x10 # *: Does not affect passage
return true if pass & flag == 0x00 # o: Passable
return false if pass & flag == flag # x: Impassable
end
for i in [2, 1, 0] # in order from on top of layer
tile_id = @map.data[x, y, i] # get tile ID
return false if tile_id == nil # failed to get tile: Impassable
pass = @passages[tile_id] # get passable attribute
if (@tab_passage.key?(tile_id)) #
return @tab_passage[tile_id][direction]
end
next if pass & 0x10 == 0x10 # *: Does not affect passage
return true if pass & flag == 0x00 # o: Passable
return false if pass & flag == flag # x: Impassable
end
end
#redefinition de la méthode qui controle la passabilité
#--------------------------------------------------------------------------
#
# mix des deux!
#
#--------------------------------------------------------------------------
def passable?( xb, yb, xa, ya, flag = 0x01)
bcustom = false
acustom = false
#détermination si besoin de customiser
for event in events_xy(xb, yb)
if event.p.size > 3
bcustom = true
end
end
for event in events_xy(xa, ya)
if event.p.size > 3
acustom = true
end
end
for i in [2, 1, 0]
tileB_id = @map.data[xb, yb, i]
if (@tab_passage.key?(tileB_id))
bcustom = true
end
end
for i in [2, 1, 0]
tileA_id = @map.data[xa, ya, i]
if (@tab_passage.key?(tileA_id))
acustom = true
end
end
#Si customisation besoin du sens de circulation
if (acustom || bcustom)
dx = xa -xb
dy = ya - yb
if(dy == -1)
a = 0
b = 3
end
if (dx == 1)
a = 1
b = 2
end
if (dx == -1)
a = 2
b = 1
end
if (dy == 1) a = 3
b = 0
end
end
if (bcustom == false)
bpass = normal_p (xb, yb, flag)
else
bpass = custom_p (xb, yb, b, flag)
end
if (acustom == false)
apass = normal_p (xa, ya, flag)
else
apass = custom_p (xa, ya, a, flag)
end
return (apass && bpass)
end
#--------------------------------------------------------------------------
#
# mets à jour les passabilités
#
#--------------------------------------------------------------------------
alias mhd_setup_events setup_events
def setup_events
mhd_setup_events
setup_pass
end
def setup_pass
for event in $game_map.events.values
next if event.list == nil
for i in 0...event.list.size
if event.list[i].code == 108
a = ""
a = event.list[i].parameters.to_s
if a[0,1] == "P"
ligne = ""
ligne = event.list[i].parameters.to_s
for i in 0...4
info = ""
info = ligne[(2 + i), 1]
if info == "T"
event.p[i]=true
else
event.p[i]=false
end
end
end
end
end
end
end
end
#--------------------------------------------------------------------------
#
# Reprise de Ashka presque telle qu'elle
# Cependant pour faire les contours d'autotile, il y a un petit rajout
# Je n'ai analysé qu'un seul autotile, alors j'espère qu'ils ont
# tous la même forme sinon ce serait balaud...
#
#--------------------------------------------------------------------------
class Game_Interpreter
def autotile (min, down, left, right, up)
$game_map.tab_passage[min + 16] = [true,left,true,true]
$game_map.tab_passage[min + 17] = [true,left,true,true]
$game_map.tab_passage[min + 18] = [true,left,true,true]
$game_map.tab_passage[min + 19] = [true,left,true,true]
$game_map.tab_passage[min + 20] = [true,true,true,up]
$game_map.tab_passage[min + 21] = [true,true,true,up]
$game_map.tab_passage[min + 22] = [true,true,true,up]
$game_map.tab_passage[min + 23] = [true,true,true,up]
$game_map.tab_passage[min + 24] = [true,true,right,true]
$game_map.tab_passage[min + 25] = [true,true,right,true]
$game_map.tab_passage[min + 26] = [true,true,right,true]
$game_map.tab_passage[min + 27] = [true,true,right,true]
$game_map.tab_passage[min + 28] = [down,true,true,true]
$game_map.tab_passage[min + 29] = [down,true,true,true]
$game_map.tab_passage[min + 30] = [down,true,true,true]
$game_map.tab_passage[min + 31] = [down,true,true,true]
$game_map.tab_passage[min + 32] = [true,left,right,true]
$game_map.tab_passage[min + 33] = [down,true,true,up]
$game_map.tab_passage[min + 34] = [true,left,true,up]
$game_map.tab_passage[min + 35] = [true,left,true,up]
$game_map.tab_passage[min + 36] = [true,true,right,up]
$game_map.tab_passage[min + 37] = [true,true,right,up]
$game_map.tab_passage[min + 38] = [down,true,right,true]
$game_map.tab_passage[min + 39] = [down,true,right,true]
$game_map.tab_passage[min + 40] = [down,left,true,true]
$game_map.tab_passage[min + 41] = [down,left,true,true]
$game_map.tab_passage[min + 42] = [true,left,right,up]
$game_map.tab_passage[min + 43] = [down,left,true,up]
$game_map.tab_passage[min + 44] = [down,left,right,true]
$game_map.tab_passage[min + 45] = [down,true,right,up]
$game_map.tab_passage[min + 46] = [down,left,right,up]
end
def change_passage(fichier, x, y, down, left, right,up)
if down == 1
down = false
else
down = true
end
if left == 1
left = false
else
left = true
end
if right == 1
right = false
else
right = true
end
if up == 1
up = false
else
up = true
end
case fichier
when "A1"
min = 2048 + (((y * 8) + x) * 48)
max = min + 47
autotile (min, down, left, right, up)
when "A2"
min = 2816 + (((y * 8) + x) * 48)
max = min + 47
autotile (min, down, left, right, up)
when "A3"
min = 4352 + (((y * 8) + x) * 48)
max = min + 47
autotile (min, down, left, right, up)
when "A4"
min = 5888 + (((y * 8) + x) * 48)
max = min + 47
autotile (min, down, left, right, up)
when "A5"
min = 1536 + ((y * 8) + x)
max = min + 1
for tile_id in min...max
$game_map.tab_passage[tile_id] = [down,left,right,up]
end
when "B"
min = 0 + ((y * 8) + x)
max = min + 1
for tile_id in min...max
$game_map.tab_passage[tile_id] = [down,left,right,up]
end
when "C"
min = 256 + ((y * 8) + x)
max = min + 1
for tile_id in min...max
$game_map.tab_passage[tile_id] = [down,left,right,up]
end
when "D"
min = 512 + ((y * 8) + x)
max = min + 1
for tile_id in min...max
$game_map.tab_passage[tile_id] = [down,left,right,up]
end
when "E"
min = 768 + ((y * 8) + x)
max = min + 1
for tile_id in min...max
$game_map.tab_passage[tile_id] = [down,left,right,up]
end
end
end
end
#==============================================================================
#
# Modifie la notion de si touche est appuyée...
#
#==============================================================================
class Game_Player
def check_event_trigger_here(triggers)
return false if $game_map.interpreter.running?
result = false
for event in $game_map.events_xy(@x, @y)
if triggers.include?(event.trigger) #changement ici on include aussi si la priorité est 1
event.start
result = true if event.starting
end
end
return result
end
end
Alright, go to line 183 and replace:
#--------------------------------------------------------------------------
# * Determine if Passable
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def passable?(xb, yb, xa = @x, ya = @y)
x = $game_map.round_x(xb) # Horizontal loop adj.
y = $game_map.round_y(yb) # Vertical loop adj.
return false unless $game_map.valid?(xb, yb) # Outside map?
return true if @through or debug_through? # Through ON?
return false unless $game_map.passable?(xb,yb, xa, ya) # Map Impassable?
return false if collide_with_characters?(xb, yb, xa, ya) # Collide with character?
return true # Passable
end
end
with:
def map_passable? (xb, yb, xa = @x, ya = @y)
return $game_map.passable?(xb, yb, xa, ya)
end
end
class Game_Player
def map_passable? (xb, yb, xa = @x, ya = @y)
case @vehicle_type
when 0 # Boat
return $game_map.boat_passable?(xb, yb)
when 1 # Ship
return $game_map.ship_passable?(xb, yb)
when 2 # Airship
return true
else # Walking
return $game_map.passable?(xb, yb, xa, ya)
end
end
end
That should fix that error. But since the scripter must not have tested how the script works with vehicles, it's possible there are other errors in the code that might now happen where they couldn't have happened before.
:p
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi1188.photobucket.com%2Falbums%2Fz415%2FScalinger2%2Fmenu7.png&hash=e10b34ccb5fc5f24f8dc0e56211e4086b8ba5a3e)
bump
edit: sry i think its script compatability error, it works fine in new project, ill try to find out >.<
edit: accidentaly put the script under main, I put it in the right spot in a new project and after you move it gives the error
http://dl.dropbox.com/u/33252047/Project4.zip