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
Guest

Thanks for the replies guys.

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

:)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×