Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Angelman's Light Tutorial

Hey Guys and Gals,

This is my first tutorial, and i'm not sure if anyone has done this kind of thing before, so I'm gonna post it. It's really very simple and i think it looks really good.


Put this into your pictures folder, and be sure to not make anything transparent or translucent. just leave it and click ok to import it.

light.png



Step 1:

Make an auto start event (if you want to have the lighting there upon entrance of the map) and do this:

Create a new event, and make two variables: "x" and "y". we'll use these later.

Next:

Autostartevent.jpg


Tint screen:

Make a tint screen command, and make the values this:
(this is only what i've found to like, you can actually make the values anything dark and it should still work)

Tintscreen.jpg


Fog:

Just follow what it says on this and it will work.

Fog.jpg


Show Picture Command:

Showpicture.jpg


And lastly for this event, make an "Erase Event" command to erase it after its done.

Now make another event (this is the actual lighting event where the light will be shown [ex. candle, fireplace, campfire]) and do this:

Newevent-lighting.jpg



Now to use those variables we made earlier:

VariableOperation-x.jpg


Now do the same with y:

VariableOperation-y.jpg



Move Picture:

Movepicture.jpg



Lastly, make a wait command of 1 frame (so the lighting can move with the map and not be stationary on screen), and we're done!

This should be the final product:

Finallighting.jpg



Like I said, this is my first tutorial and i would really appreciate any criticism or comments you have, so let 'em fly, RMXP.org!:thumb:

EDIT: you can also use this to make a cool-looking flashlight:

Flashlight.png
[/center]
 
I like it. In fact, I like it very much. This tutorial has laid out all the steps, and showed it very simply. I was actually wondering how to do this too...
 

OS

Sponsor

This was very well laid out, and although it seems like a lot of work when a character set can be almost just as effective, the end result is simply amazing. Good job!

Peace!
 
F-chan;214395":1d0yzvkq said:
really a great tutorial!
but i have a small problem:
http://www.ms-gfx.de/divinitas/screens/10.jpg[/IMG]
i did everything like you wrote here, but the light of the candle is still a little bit too right. any suggestions?

It's really easy to fix this problem, F-chan:

All you have to do is in the event with the x and y variables, you need to put another variable operation, this one either adding or subtracting from x or y to get it exactly where you want:


http://i156.photobucket.com/albums/t1/A ... weaks2.jpg[/IMG]

If you just play around with the values, (obviously in your case you don't need to have huge numbers like 50 or 60, maybe just 5 or 10 should do the trick) then the problem should be solved.



Edit: oops sorry didn't answer the question, did I?




well if you want to change the brightness, (or is that actually supposed to be "right"? :P)
just go to the Move Picture operation in the actual candle event (the one with the variables) and just turn down the opacity:


http://i156.photobucket.com/albums/t1/A ... tweaks.jpg[/IMG]

and make it like, i dunno, 100? just play around with it until you find what you want.

I'm gonna leave up my "mistaken" helper in case anyone has that problem
and wants the light to be exactly from the flame of the candle or something.:thumb:

I hope this helps, F-chan, great use of the tut by the way.
 
your first answer was the right one ^^ thanks for the fast help. sorry for my bad explainations, i'm from germany ^^" but i'm happy you understood me.
 
Desken;214440 said:
I think Near Fantastica made a script for this.
Anyways, its still a pretty nifty tutorial, well done! ;)

Script? Who needs a script when you can Event!
8-) Scripting is the easy way.
 
Theres a mistake... Im not sure if its my eventing or anything...
Here are 3 screens -
http://i4.photobucket.com/albums/y144/Army100/Examples/LightError.png[/IMG]
http://i4.photobucket.com/albums/y144/Army100/Examples/LightErrorEvent1.png[/IMG]
http://i4.photobucket.com/albums/y144/Army100/Examples/LightErrorEvent2.png[/IMG]
 

CERU

Member

I tried to do something similar in Red House and it didn't work too well, but I'm going to go back and try again now. xD

Also, flashlight systems didn't work for me when it turned up against a wall. x.x
 
@CERU: Oh yeah. I'm thinking I need to make a separate tutorial for the flashlight, because it is actually a lot more complex than this one and has a few glitches (can go through walls :P).
 
gabrielponde":26vfdkri said:
does this light system work if you want to put two candles to be lid up? because mine isn't working with two candles.

Edit: I suggested how to fix it but the poster above me stated it before I had.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top