Snarkyfork

Veteran
Veteran
Joined
Oct 29, 2015
Messages
409
Reaction score
59
First Language
English
Primarily Uses
What I am trying to do is create an event that spawns an enemy that gives chase when the player is close enough. Basically, the monster is invisible until the player gets close enough then when the monster detects the player (Yanfly Event Chase plugin) it turns visible and gives chase.

If the player wins or escapes the event flips over to a cool down page (using Shaz_MultiTimers) and at the end of the timer the encounter event resets to its original position (and turns invisible again).

Here is what I have set up so far and it would work but... apparently there is a small oversight/issue with Yanflys Event Chase plugin. If the player is already within the monsters "detection range" when the event spawns/respawns then it will not run the "this._alertCommonEvent = x" script in the movement route.

I use this script to toggle the switch that turns the encounter visible. So if the player is within the monsters detection range when the event respawns it gives chase but stays invisible.

Here is the event so far:

What I would like to get advice on is whether there may be an easier way to accomplish what I am trying to do. Am I over complicating this? I kinda need to figure out another way, rather than use the common event to flip a "player seen" switch because that would make all monsters on the map turn visible when the first monster sees them...

I am sure this has been done before, any advice would be greatly appreciated. Thanks.

Edit: Ok, I moved the CommonEvent command script up to the top of the movement route and that seems to fix the issue with the monster not running the common event but I am still left with all monsters on a map becoming visible when the CE runs and flips the switch.

Question - Can I flip a self switch using a script thats placed in the movement route, in place of the common event script? I think that would solve my problem.

Edit: Derp, I found the switch on and off in the movement route and tried using it with Yanflys Self Sw plugin but it automatically turns on the switch making the monsters visible. So that doesn't seem to work.
 
Last edited:

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,730
Reaction score
1,881
First Language
English
Primarily Uses
RMMV
You don't need plugins for any of this. All you need is a parallel event on each map with encounters that tracks both player x, y and all encounters x, y. Then if the player x, y comes in range of the enemy x, y activate that encounter's chase mechanic until player leaves its radius or engages in combat.
That same parallel event can handle cooldown timers too, with variables for each encounter on the map.

Then you can copy paste the event to other maps with encounters and just edit the events that are set as encounters in it.

But someone familiar with those plugins might be able to give a better, more direct answer.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,879
Reaction score
14,525
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Snarkyfork

Veteran
Veteran
Joined
Oct 29, 2015
Messages
409
Reaction score
59
First Language
English
Primarily Uses
It's not necessarily plugin support, I am just trying to get an example of how I might set up an enemy spawn system.
 

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png

A sketch of a character for an upcoming chapter. I am pre-preparing the heck out of this one and future chapters, don't want to spend time figuring the story out again. :blush:
Today *Fix the game UI
RMMZ maxRows make me tired.
The game supports real-time language switching (really interesting).
8laFKAa.png


jBYDFzZ.png


lYbvPth.png

mY99lgU.png

Swag collecting in the new randomly generated area. Now the mini map also shows the randomly generated features... And even illustrates the whole "bubble" system" that I made to manage memory... Though that part's inadvertent. We'll just call that "the fog of war"... Yes, that's what we'll do. Nobody will be the wiser! :kaopride:
not me being not lazy for 5 seconds and drawing another char portrait (her name is hazel)
its_hazel.png
Been a while since the last time I made a song remix. Had a blast making this

Forum statistics

Threads
110,457
Messages
1,053,464
Members
143,550
Latest member
manyattempts
Top