Hexen Windows

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Hexen Windows

Post by Xaser »

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?
User avatar
Enjay
 
 
Posts: 26855
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

From a decompiled copy of the script on Hexen MAP01

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));
    }
}
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/
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Hexen does it different than one would do (i.e. a blocking line, which is made unblocking upon impact)
User avatar
Enjay
 
 
Posts: 26855
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

Hirogen2 wrote:Hexen does it different than one would do (i.e. a blocking line, which is made unblocking upon impact)
Yeah, for my own windows I use Setlineblocking Block everything/off. Was BLOCK_EVERYTHING even an option in vanilla Hexen?
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

No.

Return to “General”