How to View Hexen Scripts?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

How to View Hexen Scripts?

Post by Syfo-Dyas »

O.K., so I have loaded up HEXEN in DOOM Builder II to analyze and see what features I can bring over and use in my Odamex maps.

One item of interest that I've found does indeed work under Odamex when using HEXEN as a pWAD for DOOM2, is the rotating walls in the first stage of Hexen. If you walk through the door at the very start of the stage, turn around and press one of the walls to your left or right, they will rotate 180 degrees and start spitting fire balls in random directions.

I examined the Polys and it appears that this is all controlled by a script, but I do not see the script when I got into DOOM Builder's script editor.

So I'm wondering how I access the script so I can learn from it?
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: How to View Hexen Scripts?

Post by Blue Shadow »

You might want to use Descript to de-compile the scripts.
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: How to View Hexen Scripts?

Post by Syfo-Dyas »

You were correct, I did want to try that and didn't even know it. Thanks!
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: How to View Hexen Scripts?

Post by Enjay »

I don't recall if you use DeePsea or not but, if you do, it can also decompile Hexen scripts. The result is pretty good. Here is map01 of Hexen:
Spoiler:
The button for doing this is on the F6 scripts dialogue in the bottom left corner.
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: How to View Hexen Scripts?

Post by Syfo-Dyas »

Thankx, yes I am a registered user, but find my self using it less and less every day.

For some reason, I ALWAYS generate map errors with DeepSea.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Re: How to View Hexen Scripts?

Post by GooberMan »

There's an even better way for doing that if you want to actually learn something rather than learn how to repeat something - and that's with a spot of reverse engineering.

Just break it down in to its components:
  • Polyobject rotates 180 degrees
  • Fireballs/projectiles spit out of the wall for a few seconds
  • Polyobject rotates 180 degrees
From there, you can start Googling/searching the wiki for polyobject rotate functions and projectile spawning functions. Referring back to a master list of functions also lets you see things that you'd otherwise miss by analysing decompiled code. The way HeXen does things isn't necessarily the best way to do things these days, after all.
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: How to View Hexen Scripts?

Post by Syfo-Dyas »

I'll keep tinkering, personally in regards to this line of thought and experimentation, I learn best by examples, but as I said, I'll keep tinkering. I thought I pretty well had everything duplicated but Odamex now crashes when I cross the trigger line.

If I can't figure it out I'll post my WAD and come back. Thanks!
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: How to View Hexen Scripts?

Post by cocka »

Here they are:
scripts.7z
(36.03 KiB) Downloaded 378 times
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: How to View Hexen Scripts?

Post by Syfo-Dyas »

WOW, thank you for saving me the additional handy work, you have all been very helpful and patient with me, thank you again!
User avatar
Syfo-Dyas
Posts: 214
Joined: Fri Dec 17, 2010 12:50 pm
Location: Another Huxleyian Dystopia

Re: How to View Hexen Scripts?

Post by Syfo-Dyas »

Alright, in this script here:

setlinetexture(1, SIDE_FRONT, TEXTURE_MIDDLE, "SPAWN09");


What is SPAWN09 referring to? A texture? HEXEN does not have TEXTURE or PNAMES so I'm a little bit lost with this one, but I think that is what is causing my experiment to crash is a reference to a texture I do not have.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: How to View Hexen Scripts?

Post by Blue Shadow »

It's the texture to set. See [wiki]SetLineTexture[/wiki].
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: How to View Hexen Scripts?

Post by cocka »

HEXEN does not have TEXTURE or PNAMES
Contrarily, it does have TEXTURE1, TEXTURE2 with texture POOT being the same as FOREST05. Every texture is included in hexen.wad.
Locked

Return to “Editing (Archive)”