Trying to get a method to be callable via Move Route, but not sure what needs to be done to achieve that, any help would be much appreciated!
Calling a method via Move Route
RPG Maker VXAce Supportdepends on where the method is.
move routes only work in local interpreter scope, maybe map object scope.
if you want to call a scene method, you have to grab the global object scene, and work your way down.
move routes only work in local interpreter scope, maybe map object scope.
if you want to call a scene method, you have to grab the global object scene, and work your way down.
gstv87 said:
Well, if you're using VX ACE, then that answer is totally incorrect here.
SceneManager.scene.some_method
what if you're at the title menu and call a map method?
you don't know what they may be trying to call, or in which order.
As long as it's a scene method, the SceneManager.scene part is mandatory. If the OP needs to call a variable belonging to that scene, the OP would need to add a method there like:
class SomeScene
attr_reader :new_method
attr_writer :new_method
attr_accessor :new_method
end
That will allow the OP to call that specific variable at will.
class SomeScene
attr_reader :new_method
attr_writer :new_method
attr_accessor :new_method
end
That will allow the OP to call that specific variable at will.
Original thread: https://forums.rpgmakerweb.com/threads/calling-a-method-via-move-route.171346/