Hexen Windows

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Hexen Windows

Postby Xaser » Sun Sep 14, 2003 12:13 pm

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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Enjay » Sun Sep 14, 2003 12:25 pm

From a decompiled copy of the script on Hexen MAP01

Code: Select allExpand view
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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Hirogen2 » Sun Sep 14, 2003 12:57 pm

Hexen does it different than one would do (i.e. a blocking line, which is made unblocking upon impact)
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Enjay » Sun Sep 14, 2003 1:05 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Hirogen2 » Sun Sep 14, 2003 1:14 pm

No.
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests