Apologies if I posted this in the wrong place or formatted something incorrectly (first time posting anything on the site, at least that I remember).
I'm trying to make a non-combat map stealth system that increases/decreases variables when seen. That is easy enough just using Yanfly's Event Chase Player Plugin.
The part I can't get to work is including Waypoints for NPCs to walk to. I'd like to have NPCs walk to ~80 different waypoints on the map, and if they see the player, trigger a common event that adds/decreases variables as mentioned above. I can get the waypoints to work using Yanfly's Self Switches and Variables to then choose a random waypoint to walk to. Problem is getting it to work with Event Chase Player.
Here is a general idea of how far I have it already (not the full ~80 waypoints, just an example):
With all of that, the NPC will move to the defined waypoints fine enough, but it doesn't trigger the Event Chase Player scripts when they should see the player. Sometimes it might trigger once but then won't trigger again for the rest of the movement, but even getting it to trigger once was inconsistent. I've tried placing all of the Event Chase Player scripts in a "Custom" autonomous movement route on their own (presumably gets overwritten by the randomly chosen ones) and tried placing them in a script move route on their own before the variable gets randomized, but nothing I've tried works.
Any help on getting this to work is greatly appreciated!
I'm trying to make a non-combat map stealth system that increases/decreases variables when seen. That is easy enough just using Yanfly's Event Chase Player Plugin.
The part I can't get to work is including Waypoints for NPCs to walk to. I'd like to have NPCs walk to ~80 different waypoints on the map, and if they see the player, trigger a common event that adds/decreases variables as mentioned above. I can get the waypoints to work using Yanfly's Self Switches and Variables to then choose a random waypoint to walk to. Problem is getting it to work with Event Chase Player.
Here is a general idea of how far I have it already (not the full ~80 waypoints, just an example):
Conditions: None Selected
Autonomous Movement = Fixed, Speed 2, Freq 5
Options: Walking, Through
Event Trigger = Parallel
Contents:
Label: Start
Script: this.waitCount = 15 + Math.randomInt (240);
Control Variables: Self Var = Random 1...5
If : Self Var = 1
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 1, 1
End
If : Self Var = 2
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 5, 5
End
If : Self Var = 3
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 10, 10
End
If : Self Var = 4
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 20, 20
End
If : Self Var = 5
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
(No MOVE TO on this one, just does nothing)
End
Jump to Label : Start
Autonomous Movement = Fixed, Speed 2, Freq 5
Options: Walking, Through
Event Trigger = Parallel
Contents:
Label: Start
Script: this.waitCount = 15 + Math.randomInt (240);
Control Variables: Self Var = Random 1...5
If : Self Var = 1
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 1, 1
End
If : Self Var = 2
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 5, 5
End
If : Self Var = 3
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 10, 10
End
If : Self Var = 4
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
--Script: MOVE TO: 20, 20
End
If : Self Var = 5
-Set Movement Route : This Event
--Script: this.seePlayer = true
--Script: this.chaseRange = 4
--Script: this.chaseSpeed = 0
--Script: this.alertCommonEvent = 20 (Triggers Variable Increase/Decrease)
--Script: this.returnAfter = false
(No MOVE TO on this one, just does nothing)
End
Jump to Label : Start
With all of that, the NPC will move to the defined waypoints fine enough, but it doesn't trigger the Event Chase Player scripts when they should see the player. Sometimes it might trigger once but then won't trigger again for the rest of the movement, but even getting it to trigger once was inconsistent. I've tried placing all of the Event Chase Player scripts in a "Custom" autonomous movement route on their own (presumably gets overwritten by the randomly chosen ones) and tried placing them in a script move route on their own before the variable gets randomized, but nothing I've tried works.
Any help on getting this to work is greatly appreciated!