Switch On/Off Lantern Effect Base Program (No Scripts) Help?

Looking for some help with making a lantern effect in my game. It's a horror style game where you later find a lantern and the goal is to make it so players can choose to use it or walk in the dark by just activating the lantern in their inventory. The tutorials I've seen and have been directed to just how how to make a character glow for a sort of torch/lantern/flashlight effect but its not exactly what I'm looking for.

If run in just a simple event, it works but its constant and can't be turned on or off unless you set up a player touch control switch. But I'm looking to turn this lantern on or off within the inventory by calling a common event. Although I got the picture and such working, the light never follows and I can't turn it off even if I set up a switch to do so.

This is how I have the script set up:
Lantern Help.png

Please, any help would be very much appreciated, and preferrably no extra scripts outside of what the base program can do. I'm not super good at coding and the base program helps a LOT! XD
Short answer, the event needs to be in parallel, otherwise it's only running it once and then never updating the "light" position.

Here's an example:
Spoiler: Light Example
1599433712396.png

This is from MV and I use some script calls rather than variable controls, but it works basically the same in ace and I don't feel like generating an example in that right now, sorry. Hopefully this helps you get to your own solution.

edit: actually I don't use script calls. ha, this is an older iteration I just loaded. Oops. Well, should make it clearer.

edit edit: Actually it does, but within the Control Variable settings. Just don't use the $gamePlayer.screenXY stuff, since that syntax is from JS. Use the built in setting for screen x/y. Also the actor image changes aren't essential: they just switched the image to show the character holding a candle instead of deafult).
I'll give it a try and see how it goes!!
Short answer, the event needs to be in parallel, otherwise it's only running it once and then never updating the "light" position.

Here's an example:
Spoiler: Light Example

This is from MV and I use some script calls rather than variable controls, but it works basically the same in ace and I don't feel like generating an example in that right now, sorry. Hopefully this helps you get to your own solution.

edit: actually I don't use script calls. ha, this is an older iteration I just loaded. Oops. Well, should make it clearer.

edit edit: Actually it does, but within the Control Variable settings. Just don't use the $gamePlayer.screenXY stuff, since that syntax is from JS. Use the built in setting for screen x/y. Also the actor image changes aren't essential: they just switched the image to show the character holding a candle instead of deafult).

So, I somewhat got it to work, but now it won't turn off and is slightly off centered from my character, which I can live with and work on later tonight, but now I gotta figure out how to turn it off through the same process of turning it on... which seems to only be activated through the menu...
Great! Sounds like you're off to a good start. Yeah the off-centering is what I was correcting with the +/- values in my version.

As for the on and off. Maybe just set a conditional in the initial common event call: If the light is on: turn off. If the light is off: turn on. And then have it run the parallel loop.

Good luck!
Great! Sounds like you're off to a good start. Yeah the off-centering is what I was correcting with the +/- values in my version.

As for the on and off. Maybe just set a conditional in the initial common event call: If the light is on: turn off. If the light is off: turn on. And then have it run the parallel loop.

Good luck!

Finally got it working, I'm gonna make a post showing how its done, I hope you don't mind if I credit you for helping me!!

Original thread: https://forums.rpgmakerweb.com/threads/switch-on-off-lantern-effect-base-program-no-scripts-help.126893/