Event triggered by follower touch? (MV)

Neikoku

Villager
Member
Joined
Apr 17, 2021
Messages
23
Reaction score
5
First Language
Finnish
Primarily Uses
RMMV
Is it possible to make an event be triggered when a follower touches it? And not the player. A script maybe? The only such plugin I found was HimeWorks's Follower Event Touch, but it doesn't work (not for others either, it's broken).
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,000
Reaction score
1,520
First Language
Dutch
Primarily Uses
RMMV
it might be possible to use this one? Hime_CustomPageCondition, than try:
<page Condition>
$gameParty.memebers()[1]
</page Condition>

or similair (1 is teh 2nd party member), so the next follower in line,
not sure if that is correct or a different approach required, but worth a shot.
 

Jragyn

JABS codemonkey
Veteran
Joined
Aug 14, 2012
Messages
221
Reaction score
169
First Language
English
Primarily Uses
RMMZ
@ShadowDragon
In order to access followers, you probably have to actually reference the characters of the followers on the map. Here is some examples, at least in-code, that you could leverage to work with followers if you had a means of using it:

JavaScript:
Game_Followers.prototype.follower = function(index) {
  return this._data[index];
};

// the "Game_Followers" object can be accessed off the player like this:

const followers = $gamePlayer.followers();

// an individual follower then could be accessed like this:
const firstFollower = followers.follower(0); // zero-based index for followers
const thirdFollower = followers.follower(2); // etc.

Once you have a follower, you could track it with variables or something (event commands), as each one should have .x and .y properties you can access that yield their current coordinates on the map. Clever event wizardry can let you literally just event this out knowing this much I think.
 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMZ
I found that the HimeWorks's Follower Event Touch works. It may seem like is not working since the event has to process a move before the it actually triggers. here is a image of a event using it
rpg maker mv.PNG
And here is a vid of the event working
 

Jragyn

JABS codemonkey
Veteran
Joined
Aug 14, 2012
Messages
221
Reaction score
169
First Language
English
Primarily Uses
RMMZ
process a move before the it actually triggers
Very specifically, based on that setup, it looks like the actual event (the knight dude) has to actually collide with your follower to trigger that. Just wanted to clarify that point in case that was fuzzy.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,000
Reaction score
1,520
First Language
Dutch
Primarily Uses
RMMV
I dont use followers, and always disable them, but my example was a
rather a hunch, and not to specific.

I thought the part members (you have in party) so in the status
would be bound as followers, if not, than it's my bad.

but I dont know if you can target the actor in party and as follower,
so you can use the name.

I rather work around, but nice explanation anyway @Jragyn while I try to learn
as much as I can :)
 

Neikoku

Villager
Member
Joined
Apr 17, 2021
Messages
23
Reaction score
5
First Language
Finnish
Primarily Uses
RMMV
@rexie09 I tested it more, it seems to work when priority is same as characters, although it also gets triggered by player. I wanted it to be triggered when stepped on, so I set priority as below characters, but then it's only triggered by player and followers do nothing for some reason.

I was trying to use this to see if I could make a follower change to a walking-in-water sprite as soon as he steps in a river, because the setup I have now requires him to take another step in the river to change the sprite, and he still has the land-sprite on his first step in the water... and vice versa for when returning to land (but for some reason the player changes sprite instantly like I want).
 

Jragyn

JABS codemonkey
Veteran
Joined
Aug 14, 2012
Messages
221
Reaction score
169
First Language
English
Primarily Uses
RMMZ
I wanted it to be triggered when stepped on
Looking at the plugin now (would appreciate it if using a plugin that you also include a link to it, because developers are a lazy breed by nature). After a quick gander, it looks like the code was not really designed to be used in any other fashion other than allowing followers to also trigger the "event touch" functionality. Based on the description, it sounds like that was all that is intended:
1621280671974.png

use this to see if I could make a follower change to a walking-in-water sprite as soon as he steps in a river
If you're hoping to accomplish this, you'll probably need to either write a new plugin, or extend the existing plugin to accommodate this.
Or, if you're open to alternatives, you could probably give the illusion of "jumping into the river" and just event the player to execute a move command of jumping 1 tile into the river or something, which would force the followers to follow suit and jump as well (I believe). If you were okay with that, it would mean you could also just swap em all to the "swimming" character set and do it again in reverse when they are getting out.
 

Neikoku

Villager
Member
Joined
Apr 17, 2021
Messages
23
Reaction score
5
First Language
Finnish
Primarily Uses
RMMV
@Jragyn Hmm I see! Odd how such a simple thing seems impossible. I can't code so I guess I'll have to try my luck at the plugin request forum, or think about that alternative... Thanks for the help in any case :LZSproud:
 

Latest Threads

Latest Posts

Latest Profile Posts

cst.PNG
What would you assume this thing was/is?
1623528827049.png
Ah yes. Just the reference I was looking for to use for my portrait. Thanks Google.
BCj
Made a logo for Mana Star :D
330bb1fde7bb06b13e23fefd83501163.png
it's e3 season again..!

Forum statistics

Threads
112,180
Messages
1,066,383
Members
145,769
Latest member
kyuubito31
Top