Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
mechasam

color chart

Recommended Posts

where can i find a chart which lists all the colors in the format zdoom uses? like 255,255,255 (im sorry i dont know the scientific-computer name for it)

Share this post


Link to post

I think there's one on the zdoom homepage, but as the damned thing been down for something like a week now, I can't say for sure :(

Share this post


Link to post

nm i found one.. do you know the script for making a colored sector? i need the complete script, i forgot how to do it (i would go to the zdoom tech page but its down)

Share this post


Link to post

If you want the sector to have a particular color when the map starts, then insert the following line in your OPEN script:

Sector_SetColor(sector tag number, Red, Green, Blue);

Use the color chart you obtained to determine the numeric value for each of the three colors. I have to point out that for some reason, ZDooM does not display all the colors on the RGB chart, and instead displays shades of gray for some color combinations. You just have to experiment with the combinations to get the right one.

If you want the sector to get the colored lighting after an action has been completed (say pressing a switch), then assign the switch linedef the script number, and write the same script command as above. An example is:

script 9 (void)

{ Sector_SetColor(14, 32, 32, 224);
}

Share this post


Link to post
ReX said:

If you want the sector to have a particular color when the map starts, then insert the following line in your OPEN script:

Sector_SetColor(sector tag number, Red, Green, Blue);

Use the color chart you obtained to determine the numeric value for each of the three colors. I have to point out that for some reason, ZDooM does not display all the colors on the RGB chart, and instead displays shades of gray for some color combinations. You just have to experiment with the combinations to get the right one.

If you want the sector to get the colored lighting after an action has been completed (say pressing a switch), then assign the switch linedef the script number, and write the same script command as above. An example is:

script 9 (void)

{ Sector_SetColor(14, 32, 32, 224);
}

k, thanks... im a lil' new at this (due 2 my absence from doom) so help me out with this other thing if ya dont mind..

i want it where if you press a door, a message will come up and say "Power Offline"... and then in another room a switch will turn on the power and a message will come up and say "Power Online".. how do i do that?

Share this post


Link to post

This situation appears simple to script, but it's slightly more involved. I presume you want the door that opens to be repeatable (i.e., it opens and shuts whenever the player uses it). The problem it poses is that the message ("Power Offline") will be displayed every time you open the door, even after the power has been turned on by the switch in another room. There is a way to terminate a repeatable script after a certain point, but then the problem is as follows: Using the door causes a script to be triggered, that prints a message and opens/shuts the door. When you terminate the script, you prevent the message from coming up, but you also prevent the door from being opened. There are ways around these problems, but they require the use of several scripts, so I won't go into the details.

If, however, you want the door to remain shut and print the "Power Offline" message until the switch in the other room has been turned on, then the script would be something like:

//////////////////////////////////////////////////////////
// Script 11: Opens door //
//////////////////////////////////////////////////////////
int poweron;
script 11 (void)

{ if (poweron)
{ Door_Raise(3,16,128);
Terminate;
}
else
print(s:"Access denied.");
Delay(70);
print(s:"Power Offline.");
Delay(70);
print(s:"Please bring power on-line to secure access.");
Delay(70);
}

//////////////////////////////////////////////////////////
// Script 12: Turns power on, and allows door to open //
//////////////////////////////////////////////////////////

script 12 (void)

{
poweron=1;
print(s:"Power Online.");
}

Script 11 is triggered when the door is pressed, Script 12 is triggered when the power switch is turned on.

(This is a modified version of one of the scripts in some levels I recently completed. In my case I used the script to activate a sliding door, but in the script above I have modified it to open a regular door.)

Share this post


Link to post
Mechasam said:

nm i found one.. do you know the script for making a colored sector? i need the complete script, i forgot how to do it (i would go to the zdoom tech page but its down)

Just FYI:

I made an offline copy of the ZDoom Tech page that you'll find on cdrom in the doom/source directory. There are two files zdtech.zip is in compiled help format and zdhtech.zip which is the html version (if I remember correctly).

Share this post


Link to post
ReX said:

The below might be wrong, I only recently started doing proper ACS work. Before that all I basically knew how to do was print text and set sector colours (see Morbid DM 1 & 2)

Anyway, If you wanted the door to repeatedly openable and closable, I think you could make it print "Power off-line" when you walk across a linedef just in front of the door, and remove the special which activates this script when you activate the power on switch.

Or, you could make a new texture next to the door (and it'd probably be a good idea to also put it in the room where you turn the power on) which reads "power off-line" which is changed to "power on-line" when you turn the power on.

Share this post


Link to post
ReX said:

thx, i appreciate it (really, i do.. thats a long message you typed there!)

im now working on polyobj doors (i.e. sliding doors, 64 length, 128 height)

i did everything, when i went to test the wad it gave me an error message that said "Spawnpolyobj: Poly 1 does not exist"

whats the problem there?

Share this post


Link to post

wait nm, thats not it... ok i made the polyobj but when i go to activate it, zdoom closes and it gives me that damn old windows error message "an illegal operation blah blah blah".... whats the problem there?

Share this post


Link to post
Stphrz said:

*takes notes for future reference*

:)

*pees on Stphrz's notes*

ZDoom is EVIL! EVIL I TELL YOU!!!

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×