- Joined
- Aug 25, 2016
- Messages
- 268
- Reaction score
- 148
- First Language
- English
- Primarily Uses
- RMMV
I'm using Yanfly's Event Chase Player plugin. Works great. Wanted to see if anyone knew a specific script I could use but wasn't sure of the coding.
In the plugin parameters, you can choose whether the event has to see the player or not to chase them. There's also scripting you can add within the movement route to turn this on/off per event:
this._seePlayer = true Requires the event to be able to see player.
this._seePlayer = false Doesn't require event to be able to see player.
What I'd like to do in my game is have this turn on/off based on whether a switch is on/off. Players have a flashlight. When it's on... I have a switch active. I then turn that switch off when players turn off their flashlight.
Is there a way for me to write a script that has the "seePlayer" check to see if a switch is on first? If on... seePlayer = false. If off... seePlayer = true
In the plugin parameters, you can choose whether the event has to see the player or not to chase them. There's also scripting you can add within the movement route to turn this on/off per event:
this._seePlayer = true Requires the event to be able to see player.
this._seePlayer = false Doesn't require event to be able to see player.
What I'd like to do in my game is have this turn on/off based on whether a switch is on/off. Players have a flashlight. When it's on... I have a switch active. I then turn that switch off when players turn off their flashlight.
Is there a way for me to write a script that has the "seePlayer" check to see if a switch is on first? If on... seePlayer = false. If off... seePlayer = true