PDA

View Full Version : Light Effects


TylerS36
03-26-2001, 06:15 AM
How do you go about using the new light effects?

Lion'el-Jonson
03-26-2001, 06:35 AM
A friend of mine scripted this :P

// NPC made by h ght j㤻
if (playerenters) {
dontblock;
drawoverplayer;
drawaslight;
this.lightonoff=0;
this.lightplusminus=0.25;
timeout=0.05;
timereverywhere;
setgif light2.png;
setcoloreffect 1,1,0,this.lightplusminus;
}
if (timeout) {
if (this.lightonoff==0) {
setcoloreffect 1,1,0,this.lightplusminus;
this.lightplusminus+=0.01;
}
if (this.lightonoff==1) {
setcoloreffect 1,1,0,this.lightplusminus;
this.lightplusminus-=0.01;
}
if (this.lightplusminus==0.99) {
this.lightonoff=1;
}
if (this.lightplusminus==0) {
this.lightonoff=0;
}
timeout=0.05;
}
(I added the [code] block - G)

Too bad somethings messed up with graal so lighting effects come out as little blocks of color on my comp >:(

TylerS36
03-26-2001, 03:21 PM
seems a bit complicated.

Lion'el-Jonson
03-26-2001, 03:24 PM
yes

Psyker
03-26-2001, 05:14 PM
my lights show up as huge black circles :(

Fai
03-26-2001, 08:37 PM
IT IS EASIER THAN THAT

TAKE LIGHT2.PNG

MAKE IT AN NPC

TYPE

SETCOLOREFFECT .5,.1,.1,.5;

AND SEE WHAT YOU GET

grim_squeaker_x
03-26-2001, 08:52 PM
Yup what Fai said works... And the script that Gabriel posted is for giving it a slowly getting bigger/smaller effect I actually already scripted something like that on the first day I downloaded Graal2001 ;) However if you want to use it with showimg you'll have to amke use of the command:

changeimgcolors index,r,g,b,a;

For R G B and A you should always use values between 0 and 1, adding the command rawaslight to an NPC will make it immune to the effects of seteffect (Or was it setcolor?) which Graal2001 uses for it's day/night.
Although if for showimg you are already making use of seteffect in the level, I think that if you add the seteffect effects to the normal values for that showimg it will look like drawaslight.

But there is also the more easy and logical to use:
setzoomeffect zoom;
Which basically takes the imageheight and imageweight * zoom. The showimg variation of that one is:
changeimgzoom index,zoom;

And blah this is about my longest post yet I think ^^

GexGecko
04-02-2001, 02:30 AM
<quote>if (playerenters) dontblock; drawoverplayer; drawaslight; setcoloreffect ?,?,?,0.99;</quote>

Lion'el-Jonson
04-02-2001, 02:54 AM
I have no cluse what the script I posted is supposed to do, since G2K1 Lights a screwed up all I see are little colored dots, its very screwed.

Thak2
04-02-2001, 10:49 AM
yeah, you cant see light effects at all, or well unless you have a good 3D card...

grim_squeaker_x
04-02-2001, 06:27 PM
Riva TNT == Being able to see light effects, and I have a riva tnt2.. Graal isn't Voodoo compatiable which causes many problems for people. And whoa Gabriel that looks severely messed up.

Thak2
04-02-2001, 07:46 PM
Would something lke this work: STB VELOCITY 4400 16MB SVIDEO NVIDA RIVA TNT?

Immitat0r
04-02-2001, 08:39 PM
Im good at the X and Y areas of a sign, I only mess up atleast once lol

grim_squeaker_x
04-02-2001, 10:28 PM
Originally posted by Thak2
Would something lke this work: STB VELOCITY 4400 16MB SVIDEO NVIDA RIVA TNT?

I think it should yes.

Spark910
04-15-2002, 12:28 AM
Originally posted by Immitat0r
Im good at the X and Y areas of a sign, I only mess up atleast once lol
not too hard!

Faheria_GP4
04-18-2002, 03:41 AM
okay im not a scripter. Whats with the script on the first or second post? Its all long and complicated....

Faheria_GP4
04-18-2002, 08:26 AM
ill stick with sfx,music,lvls, and gfx.

Saga2001
04-18-2002, 12:17 PM
Man you all confused me, I thought there was something new I was like... new light effects?! o.O then I saw it was old ones...:-/

Slaktmaster
04-18-2002, 02:19 PM
Originally posted by Saga2001
Man you all confused me, I thought there was something new I was like... new light effects?! o.O then I saw it was old ones...:-/
What were you expecting? :)

Saga2001
04-19-2002, 12:34 AM
Originally posted by Slaktmaster

What were you expecting? :)

I was just excited. Woooooo... I think I was expecting something more. :-P