Get followers to turn, not just player

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
You know the situation, the player plus followers arrive somewhere, something happens and you set the move route so that the player e.g. turns right.  The followers, however, could be facing in any direction, depending on the path taken to get to this point.


Is there a way, maybe a script call, which allows me to say party member x turn right?


Thanks.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
$game_player.followers[x].set_direction(4)


where x is the follower index - the first follower will be 0.


If you want ALL followers to do it, this would work:


$game_player.followers.each {|follower| follower.set_direction(4)}


It's easy if you only want them to take one action.  If you want them to take several, you'd need to set up a move route and apply it to them.  I wrote a tutorial on setting up move routes via scripts.


It might be worth checking out Galv's Move Route Extras - he might have something in there that allows you apply a move route to a follower.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz


I've now had the chance to test this, and I've hit problems.  I made sure to copy/paste your script call so that there would be no typos.  Here is my event.


Direction test.png


With direction (1) the followers vanish


With directions (2) and (3) the followers face down


With direction (4) the followers look left.


I disabled Galv's Route Move Extras script (which sadly does not deal with followers) in case it conflicted, but the results were the same.


I then tried it in a new, default game and still got the same results.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The numbers & directions correspond to the keys on your number pad.  2 = down, 4 = left, 6 = right, 8 = up.  
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz Oops!  Now (of course) works perfectly.


Thank you.


Closing as solved.
 
Last edited by a moderator:
Status
Not open for further replies.

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

Latest Threads

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,062
Members
137,575
Latest member
akekaphol101
Top