For my current project, I nne to dynamically generate a forced route move, an have the player follow it.
I first tried a simple :
but it did something a little .... teleport-like
I then tried to fiddle with the MoveRoute class:
but when it comes to the last line, nothing happened
Moreover, if I put the skippable attribute to false, the game hangs, as if something prevents thr player to move. Needless to say, all the surrounding are passable.
What did I forget for this to work correctly ???
Oh .... and if someone knows... What is the meaning of the first MoveCommand ( a '0' code command) automatically inserted in the lis at MoveRoute instanciation ??
EDIT : oops... I didn't mention this script is Event-called. Perhaps it has to do with queueing, ot something like that.
EDIT : changed the thread title
I first tried a simple :
Code:
case step
when 1
$game.player.turn_down
$game_player.move_down
....
....
but it did something a little .... teleport-like
I then tried to fiddle with the MoveRoute class:
Code:
route = RPG::MoveRoute.new
route.repeat = false
route.skippable = true
route.wait = true
for step in Route # array contains 1 to 4, corresponding to standard directions
route.list.push( RPG::MoveCommand.new( 15+step)) # look command
route.list.push( RPG::MoveCommand.new( step)) # move command
end
[b]$game_player.force_move_route( route)[/b]
but when it comes to the last line, nothing happened
Moreover, if I put the skippable attribute to false, the game hangs, as if something prevents thr player to move. Needless to say, all the surrounding are passable.
What did I forget for this to work correctly ???
Oh .... and if someone knows... What is the meaning of the first MoveCommand ( a '0' code command) automatically inserted in the lis at MoveRoute instanciation ??
EDIT : oops... I didn't mention this script is Event-called. Perhaps it has to do with queueing, ot something like that.
EDIT : changed the thread title