Turning a flashlight into a lantern?

If anyone could help out with this I would greatly appreciate it. I am using the terrax lighting plugin and in the plugin there is a torch and a flashlight item. First of all, I cannot seem to figure out how to "shut off" the torch by using a command. See what I want to do is have a "lantern" which uses the radius like a torch but you can shut it on and off like the flashlight.


So basically I am trying to turn the flashlight "beam" into a "radius", more or less. But I don't know if this is something that can be done easily or if I need to actually change the script (and I know nothing of js). Again, any help is very welcome, thanks.
Why not just use multiple commands in succession? I tried the script out and executed the commands via events. Here's what I did:


Turn on flashlight:


  • Fire radius 0 #FFFFFF - Turns off the lantern flickering, should one be on.

  • Light radius 10 #FFFFFF - Creates a small light radius around the player. Having this at 0 kills the flashlight, for some reason.

  • Flashlight on 8 12 #FFFFFF 3 - Turns on the flashlight

Turn off flashlight:


  • Flashlight off - Turns off the flashlight beam.

  • Fire radius 200 #FFFFFF - Turns on lantern flickering.

For a better looking transition, I think it may be possible to play with the radiusgrow command too, but the decay/growth speed does not appear to be configurable except through the source code. A quick look of it tells me there's no way to individually edit the growth/decay rate, but I'm basing this solely on a quick read-through and with the limited comprehension of script that I have.


Hope this helps!
Um... Why don't you look though the demo and look how it's done there?
Um... Why don't you look though the demo and look how it's done there?



I have been looking through it for what I am trying to do and don't see it. So um... perhaps you could point me in the right direction. Would be appreciated.


I really just need a command to turn off torch light and I can take it from there. I see the "light off" command but it doesn't seem to be working for me.


Here is what it says in the demo for turning the light off:


"Light off with (Death)Selfswitch C.


You can set a deathswitch in the parameters."


I am not sure what this means, however. What does (Death)Selfswitch C mean or how do I make one that works on the player character?
Why not just use multiple commands in succession? I tried the script out and executed the commands via events. Here's what I did:


Turn on flashlight:


  • Fire radius 0 #FFFFFF - Turns off the lantern flickering, should one be on.

  • Light radius 10 #FFFFFF - Creates a small light radius around the player. Having this at 0 kills the flashlight, for some reason.

  • Flashlight on 8 12 #FFFFFF 3 - Turns on the flashlight

Turn off flashlight:


  • Flashlight off - Turns off the flashlight beam.

  • Fire radius 200 #FFFFFF - Turns on lantern flickering.

For a better looking transition, I think it may be possible to play with the radiusgrow command too, but the decay/growth speed does not appear to be configurable except through the source code. A quick look of it tells me there's no way to individually edit the growth/decay rate, but I'm basing this solely on a quick read-through and with the limited comprehension of script that I have.


Hope this helps!

I tried making a flashlight with a beam radius/length of 1/1 then adding the light radius 200 (for a lantern light) to the flashlight on command in the flashlight "common event". It worked for turning the lantern on but adding "light off" to the flashlight off area of the common event doesn't work. Any suggestions?
1.PNG

Yeah, I found that but its for the flashlight on/off. What I am trying to do is create a "lantern effect" that shuts on and off by using the item in the players inventory (like the flashlight but with a "radius" and not a "beam").


I actually figured out how to do it in a satisfactory way, there may be other ways but this seems to work:

Spoiler
[IMG]https://i410.photobucket.com/albums/pp182/Snarkyfork/01_zpsuv494q1e.jpg[/IMG]


[IMG]https://i410.photobucket.com/albums/pp182/Snarkyfork/02_zpstjkr2du3.jpg[/IMG]


I then added an event switch to one of the map lights that turns off the player light because for some reason it is on by default and when I clicked on the torch/lantern for the first time it turned them off (no idea why).


[IMG]https://i410.photobucket.com/albums/pp182/Snarkyfork/03_zpsenv3umsr.jpg[/IMG]

 This way I can add as many light sources (like different colored crystals, etc) as I want and they will all work together correctly. Took me a lot of trial and error to get this, sadly.


Also, Yanfly has a plugin that lets you use skills/spells on the map menu (I think)... It would be cool to make a "night vision" spell that could be used from the map menu that triggers a "shader change" plugin command. But that will have to wait for another day I think.

Original thread: https://forums.rpgmakerweb.com/threads/turning-a-flashlight-into-a-lantern.60154/