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

changing colors globally rather than sector based.

Recommended Posts

Was just wondering how you would go about scripting a global color change rather than having to do it with, say, Sector_SetColor.

Something like what the invulnerability sphere does, or some of the newer custom powerups like the doom sphere.

Also would it be possible to do a gradual change to get from one color to another rather than an instant change.

Am mapping for ZDoom(Doom in Hexen)

Thanks guys.

Share this post


Link to post

Aside from tagging EVERY sector in the map to have a color to it, you could just make a custom powerup that sets the fade to whatever you need it to be on the player's screen. I believe something along the lines of Fadeto may also replicate the effects that you see from something like the doom sphere.

http://zdoom.org/wiki/FadeTo

Share this post


Link to post

This script gradually fades every sector in the tag range 0-50 to completely red. (Bear in mind that Sector_SetColor, when 0 is used for the sector tag argument, will affect all untagged sectors.)

for(int i=255; i>0; i--)
{
  for(int k=0; k<=50; k++)
    Sector_SetColor(k, 255, i, i);
  delay(1);
}
This looks best in the OpenGL renderer.

Share this post


Link to post

Thanks for the replies guys.

Between thewe two suggestions I should hopefully get what I am after.

:)

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×