Eoncounter for moving events

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
104
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
Howdy dear makers,

Could you help me to solve a problem?

I use specific moving system in my game world map. Basically the player is a pointer and moves around the map to choose where to go for a plane event. When the player hits enter, the plane event starts to go to the target tile by auto pathing.

The problem is encounters. Since encounters works only when real player moves, no encounters are triggered when the plane event moves to the target tile. How can I change that encounters would be triggered only when the plane event moves?

Another problem is that it should look at the region Id of the plane event tile, not player pointer tile. Any ideas how to make it? Thank you in advance!

Just in case since my Engrish is not very clear, please find attached picture with a visual explanation.

P.S. One way to solve it is to fade down, teleport player to the plane place, then change player graphics to the plane and enable encounters before player auto pathing starts. But I can't change player graphics to the plane and make it happen to auto move player plane instead of event plane, because I need a possibility to move a pointer around the map even when the plane is on the route.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,740
Reaction score
7,379
First Language
German
Primarily Uses
RMMV
you can't use the default encounter, so you need to make your own encounter mechanic.
For each step that the plane is commanded to move (you do that somewhere after all), call a common event to check if an encounter happens and if yes use battleprocessing to start it.
 

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
104
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
Good idea, but how can I call a common event after each step? The auto movement works by Smart Pathfinding plugin command. I uploaded the picture with the event. Can you help me to specify, where should I put common event command? Thanks!
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,740
Reaction score
7,379
First Language
German
Primarily Uses
RMMV
when using a pathfinding plugin, it is a bit more complex - but you could call the common event directly after the plugin command, and just need a check to see if a move happened or not before checking for an encounter - two variables (current step and past step number) with a conditional branch should be enough for that check.
 

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
104
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
Could you explain me how to set these variables? I am a little confused about what it should do.

Edit: OK i think Ive found the method how to control two variables and then set conditional branch to check is there is a difference between steps. But the problem is that Steps function only checks player steps, not the event steps.

Edit 2: There is a script call for that.

$gameMap.regionId($gameMap.event(m).x, $gameMap.event(m).y) === n


N = Region ID

M = Event ID (if you are looking for the x, y of another event) or this._eventId (for the current event)

So, now my problem is how to set that when the event is let's say in region 1, it would be 10% probability after each second to start battle processing. And how to disable it when event is stopped.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

I just saw in a manga an interesting mechanic - setting up a stationary teleport beacon that one can go to no matter where one is in a dungeon. I think it'll work with a similar setup to how I did my airship transition.

Ooh what if you could set up multiple beacons and choose from a list of the beacons you set up?

Hmm...
Actor2_1 added!

Is the running performance of MZ output to Android platform smoother than MV output?
FINALLY GOT ALL 120 STARS IN SUPER MARIO 64!!!

Ok i got the model New and I will develop a little more, I think my SV is not beautiful yet.

Forum statistics

Threads
103,248
Messages
998,347
Members
134,742
Latest member
kkekkbab
Top