XGUARDEN'S PROFILE
XGuarden
0
Search
hide map by region
I curently trying to make a script that will hide all sprite not from a spécific region. The idea is to create house like in dragon warrior 1. When we are inside a house, we dont see outside. and when we are ouside we dont see inside. Any bright idea? Note: I dont want to use any kind of teleportation.
Script freeze with force_move_route
My ocde can't pass trought the line Fiber.yield while $game_player.force_move_route(route)
Why? Thanks.
def walk_to(target,direction,step,through=false ,speed=4,frequency=5)
route = RPG::MoveRoute.new
route.repeat = false
route.wait = true
route.skippable = false
route.list =
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
case target
when 0
old_through = $game_player.through
old_move_speed = $game_player.move_speed
old_move_frequency = $game_player.move_frequency
$game_player.move_speed
$game_player.move_frequency
for i in 1..step
route.list << RPG::MoveCommand.new(direction)
end
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
route.list << RPG::MoveCommand.new(0)
Fiber.yield while $game_player.force_move_route(route)
$game_player.move_speed = old_move_speed
$game_player.move_frequency = old_move_frequency
when 1
character = get_character(0)
old_through = character.through
old_move_speed = character.move_speed
old_move_frequency = character.move_frequency
character.move_speed
character.move_frequency
for i in 1..step
route.list << RPG::MoveCommand.new(direction)
end
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
route.list << RPG::MoveCommand.new(0)
Fiber.yield while character.force_move_route(route)
character.move_speed = old_move_speed
character.move_frequency = old_move_frequency
end
end
Why? Thanks.
def walk_to(target,direction,step,through=false ,speed=4,frequency=5)
route = RPG::MoveRoute.new
route.repeat = false
route.wait = true
route.skippable = false
route.list =
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
case target
when 0
old_through = $game_player.through
old_move_speed = $game_player.move_speed
old_move_frequency = $game_player.move_frequency
$game_player.move_speed
$game_player.move_frequency
for i in 1..step
route.list << RPG::MoveCommand.new(direction)
end
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
route.list << RPG::MoveCommand.new(0)
Fiber.yield while $game_player.force_move_route(route)
$game_player.move_speed = old_move_speed
$game_player.move_frequency = old_move_frequency
when 1
character = get_character(0)
old_through = character.through
old_move_speed = character.move_speed
old_move_frequency = character.move_frequency
character.move_speed
character.move_frequency
for i in 1..step
route.list << RPG::MoveCommand.new(direction)
end
if through==false then
route.list << RPG::MoveCommand.new(37)
else
route.list << RPG::MoveCommand.new(38)
end
route.list << RPG::MoveCommand.new(0)
Fiber.yield while character.force_move_route(route)
character.move_speed = old_move_speed
character.move_frequency = old_move_frequency
end
end
How to call script corectly
That can look simple, but I got difficulty with script already include in RPG Maker Vx Ace. Addon script is easy but incorpored script alway fail with game_interpretter error.
Some of the script that I tryed to call are the followers:
def distance_x_from(x) et def distance_y_from(y)
def process_move_command(command)
move_forward
def pos?(x, y)
def passable?(x, y, d)
They actually exist in script code. Why I can't call them?
I tryed to create a event that check in all side for calculate passability.
But I dont find any way to make it done because all call of these fonction alway fail. Thanks for your help.
Some of the script that I tryed to call are the followers:
def distance_x_from(x) et def distance_y_from(y)
def process_move_command(command)
move_forward
def pos?(x, y)
def passable?(x, y, d)
They actually exist in script code. Why I can't call them?
I tryed to create a event that check in all side for calculate passability.
But I dont find any way to make it done because all call of these fonction alway fail. Thanks for your help.
Pages:
1













