Oh, i understand NOTHING, but I like it XD, hey, look in youtube, I say something
Stencyl Tutorial: How to add lighting effects.
A downloadable Stencyl Tutorial
Welcome to my first Stencyl tutorial! In this tutorial, we are going to explain how to create lighting effects. If you're a Scratcher, please do not copy these moves to a Scratch project. It will not work.
So first of all, create a scene like this:
After you create your scene, you need to create 1 layer called lights. (Note that the lights layer must be front of Layer 0 otherwise you won't see it.
Then, click on the Layer 0. After that, you need to remove the carpet tiles which the lights are in, like in the photo.
Click on the Lights layer and re-add the carpet tiles that you previously removed.
But as you see from the photo, we no longer see the lights. To fix this, you need to right click to each light, and left click on Bring Forward.
Now we can both see the lights and the new carpet tiles on our screen.
So if we play the game and fade the Layer 0, we are going to see something like this:
Do you see that dark? Did you noticed that the lights and the new carpet tiles aren't dark? So now we made a lighting effect.
But you maybe didn't notice something.
The Player is also dark. But the actual problem is that Lights layer is front of Layer 0 meaning that when the Player enters Lights layer, he will get under the carpet tiles.
How are we going to fix this? Simply. Right click on the Player and left click on Bring Forward.
See? Now the Player is up the carpet tiles!
So, to finish the tutorial, go to the Events page and create a when created event.
Then, find this block that my mouse is over it:
Drop it into the When Created wrapper.
Remember the layers we created?
As you see, we want to fade Layer 0 (the entire game except the lights part). So on the fade layer block, the layer ID we are going to write is 0 'cos if you see at the left part of the image, the Layer 0, has the number "0" so you will write this number.
For the % part, let's write 10% (for example).
For the "over N seconds" part, if you want to appear suddenly, write 0.001 seconds. If you want to appear like a fog write 1 or 2 seconds. l'll write 0.001 seconds at this part.
So if we test the game, it works successfully!
If you liked the tutorial, rate it.
If you want to say thanks or fix something, write a comment.
Tutorial by: Chris24XD