Graal Forums

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

Raeiphon 11-15-2005 09:50 AM

Light/Cloud Effects?
 
Say I wanted to use a NPC which has an image of mist or whatnot, and actually transpose that mist into a light form? How would I go about doing that?

setcoloreffect?
drawaslight?

Lance 11-15-2005 10:05 AM

Quote:

Originally Posted by Raeiphon
Say I wanted to use a NPC which has an image of mist or whatnot, and actually transpose that mist into a light form? How would I go about doing that?

setcoloreffect?
drawaslight?

You could add a default light NPC and then change its image.

Raeiphon 11-22-2005 11:13 AM

It appears the same as the image =/

Janus 11-23-2005 12:57 AM

Quote:

Originally Posted by Raeiphon
It appears the same as the image =/

Isn't that the point? o_O

K, I'm not sure how much you know, or what the problem is, so I'm just gonna bust through all the possible problems I can think of.

The default light npc:
NPC Code:
// NPC made by Stefan Knorr
if (created) {
setimg light2.png; // change light2.png to the mist image.
dontblock;
}
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,1,0.99; // make sure the alpha is below 1 (red,green,blue,alpha)
drawaslight;
}



Make sure you have light effects enabled and all that good stuff.

If you're wanting the npc to SHOW the mist and not BE the mist itself, use showimg, changeimgcolors, and changeimgvis.
They are used:
NPC Code:
showimg index,filename,x,y; //make sure the index number matches for these
changeimgcolors index,red,green,blue,alpha; // values are 0-1, keep alpha below 1
changeimgvis index,layer; // have layer at 3



Also, don't forget to have //#CLIENTSIDE above that stuff.

:spam: :spam: :spam: :spam:

Typing is fun. :cool:

protagonist 11-23-2005 07:00 AM

You could use a combination of lights and then change the alpha of the mist.


All times are GMT +2. The time now is 03:05 PM.

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