So I'm attempting to run some custom move commands through scripting instead of the 'Set Move Route' command in an event using this script call:
Now if I go directly into an event and use the script call command, this works perfectly fine. However if I add this same exact script call to a new class (which does inherit Game_Character), it throws an undefined force_move_route method error. Can someone please explain to me why this is? I assumed since this class inherits Game_Character that it would know what force_move_route was.
move_route = RPG::MoveRoute.new
move_route.repeat = false
move_route.skippable = true
m = RPG::MoveCommand.new
m.code = 1
move_route.list.insert(0,m.clone)
$game_map.events[eventid].force_move_route(move_route)
move_route.repeat = false
move_route.skippable = true
m = RPG::MoveCommand.new
m.code = 1
move_route.list.insert(0,m.clone)
$game_map.events[eventid].force_move_route(move_route)