Move Toward Event

KanaX

Just being a sleepy
Veteran
Joined
Apr 3, 2013
Messages
1,455
Reaction score
1,297
First Language
Broken English.
Primarily Uses
N/A
Is there a script call to use that would allow me to have an event move toward another event, like the Move Toward Player command does for the player?
I'm aware there are some third-party scripts that can help me do that, but I don't want to resort to using one, if I don't have to.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
If you use a third party script, you'd be able to make the "walk toward event" work better, but the following line should work the same way the "move toward player" works:

move_toward_character($game_map.interpreter.get_character(1))just add it to any event move route, replacing the number 1 with the ID of the event you want to follow.
 

KanaX

Just being a sleepy
Veteran
Joined
Apr 3, 2013
Messages
1,455
Reaction score
1,297
First Language
Broken English.
Primarily Uses
N/A
If you use a third party script, you'd be able to make the "walk toward event" work better, but the following line should work the same way the "move toward player" works:

move_toward_character($game_map.interpreter.get_character(1))just add it to any event move route, replacing the number 1 with the ID of the event you want to follow.
I get an error:

Undefined method 'x' for nil:NilClass
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
I get an error:

Undefined method 'x' for nil:NilClass
And the event ID is correct?

try this instead:

Code:
move_toward_character($game_map.events[1])
 

KanaX

Just being a sleepy
Veteran
Joined
Apr 3, 2013
Messages
1,455
Reaction score
1,297
First Language
Broken English.
Primarily Uses
N/A
And the event ID is correct?

try this instead:

move_toward_character($game_map.events[1])
Yep, that's it! Thanks!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top