joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
231
Reaction score
58
First Language
English
Primarily Uses
RMMV
Hello found this for VxAce. Any ideas on how to realize the same on MV?
Thank you

 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
389
Reaction score
543
First Language
French, German
Primarily Uses
RMMZ
I haven't tested it, but I think you can just use the following script:
JavaScript:
$gamePlayer.followers().follower(f).setDirection(d);

where f is a number representing the follower's position (0 being the first follower, 1 being the second, etc.) and d is a number representing the direction:
  • 2: Down
  • 4: Left
  • 6: Right
  • 8: Up
If you want all followers to face the same direction, you can also do this instead:
JavaScript:
$gamePlayer.followers().forEach(follower => follower.setDirection(d));
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
231
Reaction score
58
First Language
English
Primarily Uses
RMMV
Nice! It works. What about make a follower to move 1 step aside?
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
389
Reaction score
543
First Language
French, German
Primarily Uses
RMMZ
Nice! It works. What about make a follower to move 1 step aside?

In this case you would probably use moveStraight(d) instead of setDirection(d)

And if you want them to maintain their current direction (making them move sideways or backwards), you'd need to call setDirectionFix(true) first (then setDirectionFix(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:
$gamePlayer.followers().follower(0).setDirectionFix(true);
$gamePlayer.followers().follower(0).moveStraight(2);
$gamePlayer.followers().follower(0).setDirectionFix(false);
will make the first follower (0) move down (2) while retaining their current direction.
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.
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
So... Here's what you can do, or hack... Hehe...
1642537998664.png
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
 

Latest Threads

Latest Profile Posts

Remember to do your 0,01% progress on your game today!
Went to see Jujutsu Kaisen 0 yesterday, it was cool. The movie wasnt really a masterpiece, it had some pacing and characterization problems, but overall I enjoyed it, maybe because it was the first anime film I have ever been to in the cinema lol. The battle animation & music were top-notch. I havent seen much of the anime so people who watched the entire season would probably like it more.
MainMenu.PNG
Finally satisfied with the main menu xD

The plan was to have battle sprites in the menu...But these faces from Ocean's Nostalgia look pretty damn good imo. (Will have to adjust for them ofc and maybe recolor to match the overworld/battle sprites more)
It's always disturbing to me to see my cat eating something off the bathroom floor.

Forum statistics

Threads
121,988
Messages
1,145,736
Members
160,259
Latest member
Leonson
Top