Hello found this for VxAce. Any ideas on how to realize the same on MV?
Thank you
Make a specific follower face a specific direction
Set Follower to face a specific direction
● ARCHIVED · READ-ONLY
-
-
I haven't tested it, but I think you can just use the following script:
JavaScript:$gamePlayer.followers().follower(f).setDirection(d);
wherefis a number representing the follower's position (0 being the first follower, 1 being the second, etc.) anddis a number representing the direction:
- 2: Down
- 4: Left
- 6: Right
- 8: Up
JavaScript:$gamePlayer.followers().forEach(follower => follower.setDirection(d)); -
Nice! It works. What about make a follower to move 1 step aside?
-
Nice! It works. What about make a follower to move 1 step aside?
In this case you would probably usemoveStraight(d)instead ofsetDirection(d)
And if you want them to maintain their current direction (making them move sideways or backwards), you'd need to callsetDirectionFix(true)first (thensetDirectionFix(false)to allow them to turn again, otherwise they'll keep facing the same direction forever even when the event is over).
For example:
JavaScript:will make the first follower (0) move down (2) while retaining their current direction.$gamePlayer.followers().follower(0).setDirectionFix(true); $gamePlayer.followers().follower(0).moveStraight(2); $gamePlayer.followers().follower(0).setDirectionFix(false);
Alternative code (does the same thing, but requires less typing):
JavaScript:const follower = $gamePlayer.followers().follower(0); follower.setDirectionFix(true); follower.moveStraight(2); follower.setDirectionFix(false);
Here's the equivalent for all followers:
JavaScript:$gamePlayer.followers().forEach(follower => { follower.setDirectionFix(true); follower.moveStraight(2); follower.setDirectionFix(false); });
Again, this is untested code. -
So... Here's what you can do, or hack... Hehe...
If you do this, you'd create a global variable called gameEvent, would probably be good to use another variable name for that to avoid any conflict. I've tried it and I did not run into any issues, granted I tried it for five minutes :p
And after you're done, the follower will return to you as soon as you move :p