Lorin

Villager
Member
Joined
Aug 23, 2013
Messages
5
Reaction score
0
First Language
Polish
Primarily Uses
Hello,

Here is my first post on this forum and i want to ask you what can i do to move npc of unknown position to the place which i have set for him. His position isn't unknown but rather unspecified in the moment of starting the event(cutscene) because he and the others npcs have their fixed route(custom). I know i can use branches and variables(X,Y) to check their positions. And it can be done that way but for me it create too many branches and too much work for every npc(you can talk with these npc).  So i am asking you whether it is possible to do this shorter.

Ps. My english may be bad so forgive me any errors. Be welcome.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,658
Reaction score
439
First Language
Portuguese
Primarily Uses
RMMV
I believe that you'll need two variables, one for the even't x and one for it's y, a loop and four conditions.

Choose a position for the event to be when you want the true movement to begin.

Start a loop.

First thing first, set the variables to the event's X and Y.

Put four conditions, one inside the other's else.

>If the event's X is smaller than the position you want's X, make it move right.

>>Else, if it is bigger make it go left.

>>>Else when Y is smaller than the position's Y make it go down.

>>>>Else when it if bigger make it go up

>>>>.Inside the last else, put a Break Loop.
 
Last edited by a moderator:

Lorin

Villager
Member
Joined
Aug 23, 2013
Messages
5
Reaction score
0
First Language
Polish
Primarily Uses
Thanks for the reply. I think these answers will be very useful.
 

Latest Threads

Latest Profile Posts

Writing a game about my trauma and I want to do a level about struggling with my sexuality. It's a horror game and each level is different with a different monster chase but I have no idea how to go about this level any ideas?
It's been a while since i posted so here's something i've been working on.
Game_Mockup7_6.png
Engine: RPG Maker VX Ace

I've decided to stop buying candy in supermarket and bulk buy 4.5kg of candy. The disadvantage of that is, now I eat a lot of candy. -_-
Microsoft has consumed Activision Blizzard. Makes me wonder if they're gonna make Blizzard Blizzard again.

Forum statistics

Threads
118,544
Messages
1,116,814
Members
155,580
Latest member
WISDOMDICK
Top