- Joined
- Oct 29, 2015
- Messages
- 406
- Reaction score
- 57
- 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.
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: