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,729
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,875
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

You know you've been working on RPGMaker for a while when you go to move your projects to a 16 GB USB drive and get told not enough space to do this operation.
The latest post on TheDazzlingsAreBack...
besides itch and occasionally here where are people doing game jams at y'all? (plz do not cross reference this with my previous status lol)
Go out all day!
★No work★
Just want to sleep when I get home Zzzzz
just went through 50 issues of Fables, only to left kind of disappointed by it, I guess I have to wait for season 2 of TWAU instead.

Forum statistics

Threads
110,442
Messages
1,053,320
Members
143,509
Latest member
AfterDarkPro
Top