Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Light Effects (https://forums.graalonline.com/forums/showthread.php?t=588)

TylerS36 03-26-2001 05:15 AM

How do you go about using the new light effects?

Lion'el-Jonson 03-26-2001 05:35 AM

A friend of mine scripted this :P

// NPC made by «¤†hè Ñîght Ñïñj㤻 ¾©
NPC Code:
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 02:21 PM

seems a bit complicated.

Lion'el-Jonson 03-26-2001 02:24 PM

yes

Psyker 03-26-2001 04:14 PM

my lights show up as huge black circles :(

Fai 03-26-2001 07: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 07: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:

NPC Code:
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:
NPC Code:
setzoomeffect zoom;


Which basically takes the imageheight and imageweight * zoom. The showimg variation of that one is:
NPC Code:
changeimgzoom index,zoom;



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

GexGecko 04-02-2001 01:30 AM

Easy.
 
<quote>if (playerenters) dontblock; drawoverplayer; drawaslight; setcoloreffect ?,?,?,0.99;</quote>

Lion'el-Jonson 04-02-2001 01:54 AM

1 Attachment(s)
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 09: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 05:27 PM

Blah.
 
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 06:46 PM

Would something lke this work: STB VELOCITY 4400 16MB SVIDEO NVIDA RIVA TNT?

Immitat0r 04-02-2001 07: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 09:28 PM

Quote:

Originally posted by Thak2
Would something lke this work: STB VELOCITY 4400 16MB SVIDEO NVIDA RIVA TNT?
I think it should yes.

Spark910 04-14-2002 11:28 PM

Quote:

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!


All times are GMT +2. The time now is 08:38 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.