Moving npc,cutscene

● ARCHIVED · READ-ONLY
Started by Lorin 4 posts View original ↗
  1. 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.
  2. 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.
  3. You could do it that way, or you could use this script instead.

    Just plug it into your scripts database and follow the instructions on that thread.
  4. Thanks for the reply. I think these answers will be very useful.