[RESOLVED] A script that can create light?

Started by Rymdpotatis, July 19, 2008, 05:47:46 am

Previous topic - Next topic

Rymdpotatis

July 19, 2008, 05:47:46 am Last Edit: July 21, 2008, 08:08:57 am by Blizzard
I'm not a big fan of using pictures to illustrate enlightened areas. Mostly becouse I can never get them to work properly XD

So I was wondering if there is a script that could do the job, to create a lighter area around events with certain names. In this case: Torches so it would appear that they radiate light. I'm sure it is possible to make something like that since scripting can create mini maps without pictures. =3

Punn

you can use an image, I'll post it here later.. but there's another script, but I explain more once hangover dies

Rymdpotatis

Quote from: mumerus on July 19, 2008, 08:26:38 am
you can use an image, I'll post it here later.. but there's another script, but I explain more once hangover dies



Alrighty =3

tSwitch

July 19, 2008, 11:07:26 am #3 Last Edit: July 19, 2008, 11:11:47 am by NAMKCOR
to 'create light' I use cosmetic fogs, here, lemme post the pic tutorial I did for someone a while  back :D

Spoiler: ShowHide

first, you take a screenshot of the map.
I'd suggest doing it in the map editing window, as you can zoom out to see the whole map, and not have to do puzzle editing to get the big fog together in your photo program (I use gimp)


Next, you create a gradient in a new layer over the map.  It has to be a circular gradient, from black to Alpha- 0% black, to create the proper fade.


then, delete the lower layer (the map) and save your completed fog
I'd suggest naming it the same as the map, and putting in the map number, just so you remember.


in a parallel process on the map in game, put a change map event, and make the fog activate
if you were at 1/1 in the map editor when you screenie'd the map - fog is at 100%
if you were at 2/1 - fog is at 200%
if you were at 4/1 - fog is at 400%
(this is the fog's magnification, btw)
coordinates: top left orientation - 0,0

it should end up looking something like this (only with your map, not mine xD)



hope that helped


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: tSwitch.us | Twitter | Tumblr

Rymdpotatis

Ah, many thanks for the tutorial, even I could understand it. ^_^

Zinx10

sorry for the bump, but is there any way to make the light follow you like a lamp or light that you are carrying?

Blizzard

You can store the player's screen coordinates into variables and display the picture according to those coordinates. This would give the impression that the player is carrying the light. I actually posted a demo on this here.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Exiled_by_choise

Hey Blizzard I clicked on the link to the other topic and when I went to download the demo it's not there can you send it to me or repost it.

Thanx

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

MeVII

Hello All:

I hope I can avoid being scourged for "necro-posting" or whatever the lingo may actually be, but...

...I figgured Id mention my Animated Lighting Effects event system here.
Because between Blizzards method, and mine, anyone should be able to do just about anything with lighting anyway they want.

                                                                                                                                                                                       MeVII

element