Timer Issue/Khas Lighting Effects

I have been looking everywhere, but everything i am finding isn't making sense to me.

I am using Khas Lighting Effects and wanted to use the "lantern" as a "Match" item to light up a room, but after a certain amount of time the match will go out and you will have to activate it again.

How can I do that?

I understand that i will have to call a common event on the item "Match" but i have no idea what to do after that.

I set it up like this, but my character will not move lol

RMVX ace pic.png
I've moved this thread to Khas' Scripts support. Please be sure to post your threads in the correct forum next time. Thank you.
Okay, Why do you erase the event? This seems wrong to  me. I am a little tired but I will do my best to explain you how to work this out.

What you need is one or two conditional Branches and a few switches.

According to the state of the switches, the conditional branches will run different pieces of code.

Here is the logic.

Light = ON

Match = OFF

(initial values of two switches)

Now to use lantern effect of a match... I need to know first if lights are out.

(You use Control Switch in an event and set Light = OFF)

Ohhh! Creepy!

CONDITIONAL BRANCH:

IF Light = OFF

YOU MUST CHECK IF MATCH IS ON TO SET THE EFFECT

IF MATCH ON

 SET THE LANTERN EFFECT

ELSE

 SET EFFECT OFF

END IF

ELSE

Do not add anything here.

END IF

Meanwhile in another parallel proccess.

IF MATCH = ON

      wait 600 frames

      SET MATCH OFF

END IF

ELSE

DO NOTHING
I think i set everything up correctly but its not working. I'm also trying to upload screenshots but I can't find the attach button?
How to upload the image to the forums


Now that you have you have an image on your computer you'd like to show us, how can you get it to show up on the forums? Firstly, you need to find an image hosting site, photobucket.com or imageshack.us are popular ones. If you have another image uploading website, great - use that one! Either way, upload it to the site, and then get the direct link. Don't get the resized link, or the thumbnail link, but the direct URL. You'll know you have the direct URL if the URL ends with the file extension you saved your image in (which will hopefully be .png).



Once you have this direct URL to your image, simply use the IMG tags in your forum post and paste the URL in between them. If this image is big, please leave the image in spoiler tags.

IMG tags:
image.png
http://s628.photobucket.com/user/noxiouswilll/media/Ace%20pic%201_zpsuya5gzby.png.html]
Ace%20pic%201_zpsuya5gzby.png


http://s628.photobucket.com/user/noxiouswilll/media/Ace%20pic%202_zpsk8g5gq5y.png.html]
Ace%20pic%202_zpsk8g5gq5y.png


http://s628.photobucket.com/user/noxiouswilll/media/Ace%20pic%203_zpsb7mpryrk.png.html]
Ace%20pic%203_zpsb7mpryrk.png
I would do the following:
 
1. Create a common event Match on, set the trigger to None and add these commands:
m1_zpse37p37j9.png

 
2. Create another common event Match, set the trigger to Parallel Process, add a switch and these commands:
m2_zpsu6o0h5wn.png

 
3. Create your item and make it call the first common event:
m3_zpsjqo3e2w7.png
It works!

Thank you so much Khas, as well as Shaz and DreadShadow!

Original thread: https://forums.rpgmakerweb.com/threads/timer-issue-khas-lighting-effects.46546/