Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Room dimness (https://forums.graalonline.com/forums/showthread.php?t=30513)

Yushiwa 06-01-2002 02:39 AM

Room dimness
 
How can I make a room a little bit dim? Or to where I can change the dimness in the NPC Script? I am working on a thing and I forgot how to do it. It has been such a long time.

BBflat 06-01-2002 02:49 AM

Change the backpal of the room.

Yushiwa 06-01-2002 02:59 AM

And how would I come along to doing this?

Yushiwa 06-01-2002 03:29 AM

Wait, got it. Nevermind, thanks.

Python523 06-01-2002 04:27 AM

backpals are bad =/ use effects (seteffect)

Projectshifter 06-01-2002 06:32 AM

Lol! Backpals are good! Here's an idea:
if (playerchats&&strequals(#c,Setbackpal dusk1.png)) setbackpal dusk1.png;
and add it for each of the backpals you want. Or you can try:
if (playerchats&&strcontains(#c,setbackpal)) setbackpal #c; and set the string length to minus 11.
---Shifter

BBflat 06-01-2002 08:52 AM

Quote:

Originally posted by Python523
backpals are bad =/ use effects (seteffect)
What do you have against backpals?

Python523 06-01-2002 12:30 PM

Quote:

Originally posted by BBflat

What do you have against backpals?

they are useless and outdated, they don't even color NPCs, all a backpal does is temporarely 'dye' the tile set, seteffect is much better and more efficent

Saga2001 06-01-2002 01:07 PM

Quote:

Originally posted by Python523

they are useless and outdated, they don't even color NPCs, all a backpal does is temporarely 'dye' the tile set, seteffect is much better and more efficent

*total agreeance*

nyghtGT 06-01-2002 04:12 PM

I prefere seteffect:
NPC Code:

seteffect red,green,blue,alpha


Since you want to make the room darker lets use black.
NPC Code:

seteffect 0,0,0,alpha


The red, green, and blue have been replaced by zeros because using a RGB coloring system 0 red, 0 green, and 0 blue is black.
Now for the alpha, the alpha is the degree of intensity the color is put out.
0 being the most and 1 being the least.

This means you vary the level of darkness with decimals between them.
NPC Code:

//#CLIENTSIDE
seteffect 0,0,0,1;


This makes the level completely visible and it your starting point.
Now to make it half between dark and light you would change the alpha to 0.50.
NPC Code:

seteffect 0,0,0,0.50


Now just adjust the alpha to your specifications and enjoy.
This is //#CLIENTSIDE.

Spanko 06-01-2002 06:21 PM

Quote:

Originally posted by Python523

they are useless and outdated, they don't even color NPCs, all a backpal does is temporarely 'dye' the tile set, seteffect is much better and more efficent

They are actually quite useful, since you don't want NPCs to change colour for a season system which uses setbackpal.
It's only outdated for day-night purposes.

nyghtGT 06-01-2002 06:28 PM

Quote:

Originally posted by Spanko
They are actually quite useful, since you don't want NPCs to change colour for a season system which uses setbackpal.
It's only outdated for day-night purposes.

You can use the command drawaslight to make the npcs show their true colour.

Spanko 06-01-2002 06:52 PM

Quote:

Originally posted by nyghtGT

You can use the command drawaslight to make the npcs show their true colour.

Yes, but you also don't want players to spontaneously turn a different colour just because it's a different season do you?

nyghtGT 06-01-2002 07:31 PM

Quote:

Originally posted by Spanko
Yes, but you also don't want players to spontaneously turn a different colour just because it's a different season do you?
There is surely a command for that...

Stefan is just being greedy;)

azuretek23 06-01-2002 11:57 PM

well I am preety sure alot of that crap dosent work for me :) so backpals are tasty enough :)

VampiricTutorNewHD 06-04-2002 09:18 PM

If you use seteffect to make the level dim, you can't use lighting for the level. This, more often then not, defeats the purpose of having the level dim(to emphasize the lights).

IceFire_TK 06-04-2002 09:42 PM

Quote:

Originally posted by Projectshifter
Lol! Backpals are good! Here's an idea:
if (playerchats&&strequals(#c,Setbackpal dusk1.png)) setbackpal dusk1.png;
and add it for each of the backpals you want. Or you can try:
if (playerchats&&strcontains(#c,setbackpal)) setbackpal #c; and set the string length to minus 11.
---Shifter

i suggest using this:
NPC Code:

if (playerenters) {
toweapons Backpal Changer;
}
if (isweapon) {
if (playerchats&&startswith(setbackpal,#c)) {
tokenize #c;
setbackpal #t(1);
}
}


Should work. Haven't tried it because personally i don't like back pals because they cause lag :(

nyghtGT 06-04-2002 10:13 PM

Quote:

Originally posted by VampiricTutorNewHD
If you use seteffect to make the level dim, you can't use lighting for the level. This, more often then not, defeats the purpose of having the level dim(to emphasize the lights).
YES YOU CAN!

USING SETEFFECT DIMS EVERYTHING!!! (sprites, webgifs, and other things)

To exclude things from being emphazied by seteffect you use the wonderful command called 'drawaslight'!!!!

VampiricTutorNewHD 06-04-2002 11:10 PM

Sorry, I'm not a scripter. I didn't know that. I just figured that logically, the purpose of backpals was to be the sole room dimmer.

nyghtGT 06-05-2002 12:15 AM

Quote:

Originally posted by VampiricTutorNewHD
Sorry, I'm not a scripter. I didn't know that. I just figured that logically, the purpose of backpals was to be the sole room dimmer.
Backpals only dim the tileset.

Falcor 06-07-2002 09:30 PM

Quote:

Originally posted by kevy
0.o
If your post is unintellegent. Please reconsider pressing the "submit reply" button.


All times are GMT +2. The time now is 06:22 PM.

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