kristus Posted February 10, 2011 I'm trying to make a light strobing effect with ACS. And while it was easy to make a crude script that simply ran a loop with a shitload of lines. It wasn't very manageable when you wanted to do fine tuning of pace and such. So I wanted to make it a bit more clever. I'm not very comfortable with ACS yet though, and especially with not being sure of what functions listed on Zdoom's wiki is actually present in Hexen's original version of ACS it makes things more difficult. I noticed that there doesn't appear to be any goto command in ACS which i found odd. But anyway. I was hoping that someone could give me a bit of help on the way. Because right now (as unimpressive as it is) I'm not really getting anywhere. 0 Share this post Link to post
AlysiumX Posted February 10, 2011 Are you trying to do a strobe effect of a single sector or multiple sectors one after the other? 0 Share this post Link to post
Chopkinsca Posted February 10, 2011 It's kind of hard to know what exact effect you want. Do you want a bunch of sectors to fade to a brightness then fade back? Or just blink? Having them blink would be easy in a For loop. On which functions are or not in the original hexen, maybe asking someone who codes a hexen port would have that info. 0 Share this post Link to post
kristus Posted February 10, 2011 kristus said:I'm trying to make a light strobing effect with ACS. That is all. Doom and Heretic sector special 8, light glows. 0 Share this post Link to post
Chopkinsca Posted February 10, 2011 Not sure if this would work, it's been a long time since I worked with ACS. Int StrobeLightValue, NormalLightValue; script 1 (void) { // (StrobeLightValue - NormalLightValue) should be dividable by LightValueIncrement for(int X = NormalLightValue; X <= StrobeLightValue; X += *LightValueIncrement*){ for(int Y = *lowestsectortag*; Y <= *highestsectortag*; Y++){ Light_ChangeToValue (Y, X); // Y = tag, X = brightness } delay(*anynumber*); //time between light changes } Delay(*anynumber*); //time for light to stay at maximum for(int X = StrobeLightValue; X >= NormalLightValue; X -= *LightValueIncrement*){ for(int Y = *lowestsectortag*; Y <= *highestsectortag*; Y++){ Light_ChangeToValue (Y, X); } delay(*anynumber*); //time between light changes } delay(*anynumber*); //delay before next strobe }Values between *'s are inputted by you. The script relies on all sectors being the same value. Having different sector light values would need arrays. I tried to make it so it's easy to change values to get the proper effect you want. Edit: or maybe Light_Glow as you mentioned. gah. Not sure how that would work on multiple sectors though. 0 Share this post Link to post
Xaser Posted February 10, 2011 kristus said:I'm trying to make a light strobing effect with ACS... ...Doom and Heretic sector special 8, light glows. That's indeed confusing, because Doom's glow effect is not what a strobe light does. Strobing is (fast) blinking. At any rate, ZDoom has a Light_Glow special for this that should do what you want easily. Here's a script that assigns a bunch of delayed glow effects to a range of sectors, to get a lighting effect like what you see in Guardian of Steel:int highLight = * // maximum brightness of effect. int lowLight = * // minimum brightness of effect. int lowtag = *; // Set to lowest tag desired. int hightag = *; // Set to highest tag desired. All tags in range will be affected. int glowTime = * // # of tics it takes to cycle between high/low light values. int glowDelay = *; // # of tics before starting next sector's light glow. script 1 OPEN { for(int i = lowtag; i <= hightag; i++) { Light_Glow(i, highLight, lowLight, glowTime); delay(glowDelay); } } I have no idea either whether or not this function existed in Hexen ACC or if it was a ZDoom extension. A few maps (Guardian of Steel naturally comes to mind) did use lighting like this, though, so there's likely a shortcut to it even if it's not this. 0 Share this post Link to post
printz Posted February 10, 2011 ?116:Light_Strobe / tag / upper / lower / u-tics / l-tics tag: tag of affected sector upper: brightest light level lower: lowest light level u-tics: tics to stay at upper light level l-tics: tics to stay at lower light level Sorry, I'm not sure if you're looking for this or something more elaborate than this. EDIT: or this 115:Light_Flicker / tag / upper / lower / arg4 / arg5 tag: tag of affected sector upper: brightest light level lower: lowest light level 0 Share this post Link to post