Why do Hexen switches SW_OL and SW_EL not animate when used?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Why do Hexen switches SW_OL and SW_EL not animate when used?
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?
- Kappes Buur
-
- Posts: 4120
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Why do Hexen switches SW_OL and SW_EL not animate when used?
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
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.
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);
}
}
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.