opacities? Yes this word exists! ☺️
By the way can't wait to see what you made @Khas! 🙂
It's a odd question but, does this work with Theolized SBS? :distrust:
You mean having lightings in battle? I don't think so...
@Sindaine
Ah, that works, thank you!
Also, I figured out that you can change Surfece_Z = 45 to make the picture unaffected as well.
@Jestereir @Sindaine
The best value for Surface_Z I've found is 50. My new script will be released with this value as default.
I'm having two problems... First, I'm not sure how to configure my tilesets so that the script knows how to cut the lighting. The other thing is that I have a skill that calls a common event that activates the flashlight effect, but I want it to only stay on for a certain time before going out again. I think I can do that with a timer and the hide command, but I cant get it to work, so I don't think I'm doing it right... help?
@clockworksgod
Please check the tilesets on the demo, it's very simple to configure them - you just need to use tags.
Can you show a pic of that common event?
This is what I've got so far... It turns the flashlight on okay, but it just stays on forever after that. I was trying to figure out how to have it run out after a while. I'm SURE I'm not using that hide command correctly, just not sure how I would correctly use it.
@>Comment: [light 2]@>Script: l = $game_map.lantern: l.change_owner($game_player): l.set_graphic("torch_m"): l.set_opacity(180,30): l.show@>Conditional Branch: Timer 1 min 0 sec or more@>Script: l = $game_map.lantern: l.hide@>: Branch End@> PS, I found the terrain tags. Now I feel dumb, I should have realized that was what it meant!
@Khas
Ahh, alright thank you so much, Khas! Thanks for making this great script too uwu
@Sindaine
Thank you! 😀
@clockworksgod
This conditional branch won't be executed:
Conditional Branch: Timer 1 min 0 sec or more
Try to substitute it by a wait command, something like:
l.show
wait(time)
l.hide
Then you will see that the event works, but the player is frozen while the lantern is lit. Thus, mark the common event as parallel process, requiring a switch to run. Turn off this very switch at the common event's end. After that, create a new common event (which should be called when using the skill), and set it to activate the switch you used before on the previous common event. Everything should work fine then 😀
Please let me know if you have any questions!
@Khas: That ALMOST works... It turns on the flashlight and it stays on for x amount of time before turning off again, but the problem is that the character is completely immobilized until the time runs out... I wonder if it would work if I were to make the skill apply a state and apply the script to the state instead... Hmmmm.... Any other ideas?
Edit: Never mind... I don't think I can use a state to call the script. I know there must be a way to make this work...
@clockworksgod
Have you tried what I described?
1. Mark the common event as parallel process;
2. Mark it to require a switch X to run;
3. Turn off this very switch X at the common event's end;
4. Create a new common event (which should be called when using the skill);
5. Set it to activate the switch X you used before on the previous common event.
@Khas: ... Oh my god, I've made a fool of myself. I got too excited about you telling me how to use the wait command that I forgot to read the rest of your post and completely missed that entire paragraph. I'm so sorry.
But anyway... I tested that with a 300 frame wait time, and it executes okay, but then when it SHOULD turn the light off, it crashes and gives me an error that says:
Script 'Game_Interpreter' line 1411: NameError occurred.undefined local variable or method `l' for #<Game_Interpreter:0xb0201ec> Any idea what that means? I can try to give you my demo file or take some screenshots of code or something if you'd like to look at it personally.
@clockworksgod
Oh, I forgot, you need to call:
l = $game_map.lantern
l.hide
Or just:
$game_map.lantern.hide
Calling l.hide alone will give this error.
@Khas: Yep, that was it. I probably should have been able to figure that out. But whatever, it works perfectly now! I just want to make it known that I am in love with your script, and it's going to be very helpful in my game. Its a Halloween-themed RPG. I'll be crediting you for the script and for debug assistance. If you're interested, you're more than welcome to see all pre-alpha/alpha/beta builds. If you want to take a look, PM me and I'll be sure to shoot things your way when they're available.
Also, just wondering, would you like to be credited as "Khas" or something else?
@Khas
whispers new lighting script? please update this thread when you do!! I really like your scripts ahhh
//rollsbackout