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,722
Reaction score
1,867
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,861
Reaction score
14,510
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 Profile Posts

Kind of relieved that I had medibang installed when I need to edit Sprite I was about to download gimp but I remember I had medibang installed lol
Voting for the first round of the Map Madness Tournament is now live! Vote for your favorite in each matchup!

Finally started working on Grim Trigger episode 2 today :LZScat: it's half comic/half visual novel!

GfY3Rwj.png
Is it interesting to get more backstory on villains? A key moment in their past, their childhood, or maybe something that shows they've always been that way? To see or not to see?
"Everything tastes like chicken until it's chicken, then it doesn't taste like chicken."
Context: chicken samosas do not taste like chicken. I thought it was veggie samosas.
Just another ordinary evening.

Forum statistics

Threads
110,365
Messages
1,052,625
Members
143,398
Latest member
Rintosi
Top