Circle of Light script

Hi,

I would have a question, I've found a script about a circle of light around player here:

http://galvs-scripts.com/galvs-visibility-range/

I'd like to try it but I can't figure out what I should write in the common event to active it.

Maybe the script is self-explanatory, but not for me, sorry.
The script simply use switch to activate

Change the setting. For example

SWITCH = 50If switch 50 is ON, the the visibility range will be turned ON
The script simply use switch to activate

Change the setting. For example

SWITCH = 50If switch 50 is ON, the the visibility range will be turned ON
Thanks, but are you talking about this line:

SWITCH = 5000      # This switch turns the visibility range on/off. Default OFF
Yeah. First make sure the image needed for it is in whatever folder it's supposed to be in, I'm assuming the picture folder. Then simply turn switch 5000 on to turn on the script.

Turn that same switch off to turn it off. Try and darken the map your character starts off in to test this properly (Due so by creating an event on the map, enter the event commands, choose the 2nd page and choose tint screen and choose a dark color. Make it a parallel process and for now, you may choose to either give it a page two with a self switch a command or choose the erase event command on the 2nd page of event commands).

On your starting map or whatever map your character is suppose to spawn in, create a single event, and use the "change switches" event command and under "single" look for switch 5000 (You can actually change this switch to whatever switch from within the script, I believe) and turn it "on".

You can create a 2nd event to turn that very same switch "off".
Thanks, but are you talking about this line:

SWITCH = 5000      # This switch turns the visibility range on/off. Default OFF
Yeah, I'm talking about that line. What's the problem? I thought it was the one you're asking
Yeah, I'm talking about that line. What's the problem? I thought it was the one you're asking
The problem is that I'm a NOOB and I miss something that probably is obvious.

Anyway,

I put the images in the system folder of my project.

I tried to modify "switch = 5000" inside the script like "switch = 50". Nothing

I tried to create a switch called "5000" or "switch 5000" or "switch = 5000" and putting On in a event in my game. Nothing.

I download and tried the demo with version 1.0 of the script. Nothing.

I opened the demo with editor, I find a switch called "visrange on off", so I created, in the demo, a event with that switch ON and... finally, I had the circle of light working.

In my game I create a switch called like that in the demo. Nothing.

I changed parameters of the script in my game like that in the demo (switch=1 SIZEVAR = 1). I have an error*.

I take the script from the demo into my game and then I create a switch called like that in the demo. I have a error.

* Script'Cache' line 88: NomethodError occurred.

Undefined method 'empty?' for nl:NilClass

In the end I put a circle of light without a script, but I'm still curious to know what I've done wrong.

@MHRob

thanks for the tutorial.

Original thread: https://forums.rpgmakerweb.com/threads/circle-of-light-script.35894/