Hexen Windows
Hexen Windows
Not really a Zdoom question, but on some maps in Hexen, there are smashable stained glass windows. How does Hexen actually do the smash effect? SetLineTexture and Thing_Spawn maybe?
From a decompiled copy of the script on Hexen MAP01
I've used the effect in a lot of scripts myself, but I use setlinetexture and change whether a line is blocking or not as well.
You want an example? Of course you do.
I thought this was on my Tripod site. I'll have to upload it. Oh well, I'll attach it for a while.
Edit: OK, removed the attachment. You can now find the file at the bottom of my tripod site.
http://members.lycos.co.uk/Enjay001/
Code: Select all
script 1 (int arg0, int arg1, int arg2)
{
int var0;
Floor_LowerInstant(arg0, 0, 16);
thingsound(arg1, "GlassShatter", 127);
delay(const:1);
var0 = 20;
while(var0 > 0)
{
var0--;
Thing_ProjectileGravity(arg1, random(54, 63), random(0, 255), random(10, 40), random(5, 20));
Thing_ProjectileGravity(arg2, random(54, 63), random(0, 255), random(10, 40), random(5, 20));
}
}
You want an example? Of course you do.

I thought this was on my Tripod site. I'll have to upload it. Oh well, I'll attach it for a while.
Edit: OK, removed the attachment. You can now find the file at the bottom of my tripod site.
http://members.lycos.co.uk/Enjay001/