[ACS] Sector_SetSpecial(tag, special #);

Moderator: GZDoom Developers

User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

[ACS] Sector_SetSpecial(tag, special #);

Post by ace »

The title pretty much says it all. I'm surprised there isn't something like this actually, but it could come quite in handy in many situations.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

What do you need it for? Most of the sector specials are only important at level start time and won't have any or not the correct effect if changed during the game.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

I need to stop a light from flickering, because I'm using a scene to fade to black and when I do the light keeps flickering. I tried using fadeto but sadly I found that fadeto doesn't work on camera views.

Though, this could also make even more complex things possible, like for example say have some flickering lights because the power in the building is low and restoring full power would make the lighting normal. Or, say you get into a "vehicle" made of sectors, and when you're inside the special is set to scroll to give the illusion that the vehicle is moving (this could also be done with Scoll_Ceiling and Scoll_Floor but you get the point).

Also, how would it not have the right effect if it were changed?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Ah. For that a Sector_SetSpecial wouldn't work at all. Lighting effects are spawned at map startup and the sector special is cleared afterward. Same for the scrollers. They are also initialized at map startup and wouldn't work properly if set during gameplay.


To stop a lighting effect you need to use Light_Stop. But beware. That special has a bug in .96 and only works properly in .96x and upward
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Graf Zahl wrote:Ah. For that a Sector_SetSpecial wouldn't work at all. Lighting effects are spawned at map startup and the sector special is cleared afterward. Same for the scrollers. They are also initialized at map startup and wouldn't work properly if set during gameplay.
That's too bad...
To stop a lighting effect you need to use Light_Stop. But beware. That special has a bug in .96 and only works properly in .96x and upward
Thanks! And no worries, I'm already using .96x features as it is. If not all the features (like warp2 etc) make it into 2.1.0, I'll just put a disclaimer saying it will only run on the community build. :p
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Or with GZDoom. I will continue to support .96x features - even if Randy does not. ;)
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Yeah, that's true... however for a few reasons I actually think Paranormal plays better on ZDoom. One of the main things is the 8-bit mode, which comes in handy because I can take advantage of purposely misaligned textures without making them look crap. Plus there are still some bugs with GZDoom... but when they're fixed, I suppose I will want to actually map for it anyway because I'm itching to use 3D floors. :)

Anyways...
User avatar
Enjay
 
 
Posts: 27393
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

For a flickering light, the other approach is to flicker the light using a restarting script, and then stop the script when you want the flicker to stop.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

How about some specials that can set the different lighting effects at run time? Some can be done but others not.
User avatar
solarsnowfall
Posts: 1581
Joined: Thu Jun 30, 2005 1:44 am

Post by solarsnowfall »

Enjay wrote:For a flickering light, the other approach is to flicker the light using a restarting script, and then stop the script when you want the flicker to stop.
This is the method I use to do what Ace seems to be needing, and it works fine for me.

Return to “Closed Feature Suggestions [GZDoom]”