Page 1 of 1
Why do Hexen switches SW_OL and SW_EL not animate when used?
Posted: Wed Aug 24, 2022 3:41 am
by NicNamSam
It's the one that moves from side to side and the star that flips around. I know there is a whole thing with animdefs that I can get into, but I'm not at that level yet, and these are default switches that should animate by themselves, right?
Re: Why do Hexen switches SW_OL and SW_EL not animate when used?
Posted: Wed Aug 24, 2022 1:06 pm
by Kappes Buur
Hexen was the first game to introduce scripting and they made good use of it.
These switches were animated through scripting.
For example:
for SW_OLx in MAP04 Guardian of Ice see scripts 9, 10 and 11
Code: Select all
script 9 (void)
{
sectorsound("Switch1", 127);
sectorsound("SwitchOtherLevel", 127);
setlinetexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "SW_OL2");
delay(const:2);
setlinetexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "SW_OL3");
delay(const:2);
setlinetexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "SW_OL4");
delay(const:2);
setlinetexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "SW_OL5");
printbold(s:"ONE HALF OF THE PUZZLE HAS BEEN SOLVED");
delay(const:96);
printbold(s:"ON THE SEVEN PORTALS");
if(gametype() != GAME_NET_DEATHMATCH)
{
ACS_Execute(const:1, 2, 0, 0, 0);
}
}
The switch linedef was set to a specific tag with Line_Identification, in this case 3, in the editor and then the script applies the texture change.
In your own maps you could do the same if you stick with vanilla Hexen maps or use ANIMDEFS and SNDINFO/SNDSEQ in maps for GZDoom formats.