Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
CodenniumRed

How to make monster death trigger a door open in HeXen?

Recommended Posts

I have a HUGE HeXen level that's almost ready for submission (almost 1000 sectors, 10000 linedefs), but I need to know one thing if possible before I submit it.

I want the death of a boss monster to open a door, this requires scripts but I'm not sure how to implement it.

Basically, I want two doors to open at speed '20' and stay open indefinately upon the death of the monster. The only script I have in the level currently is the following:

#include "common.acs" //or "zcommon.acs"

Script 1 OPEN
{
}

If this doesn't work, I'll always stick to my plan of having barriors gradually lower... I'm already doing this to have monsters reappear during the boss battle (spoiler!). By the way, the tag I'm currently using for the doors is number 11, from a switch inside the room where the final barrior goes down 'cause that takes the longest. But obviousely it's not timed very well with the death of the boss, so any help is appreciated! :)

Share this post


Link to post

I'm a bit closer, I can tell, but I still can't get anything to work. At least Im on the right track, thanks for the link. :)

I have the following script now in my HeXen wad which compiles without trouble:

#include "zcommon.acs"

script 1 (void)
{
DOOR_OPEN(const:11, 20);
}

But in-game, when the boss dies, I also get the error:

P_STARTACS ERROR: UNKNOWN SCRIPT 80

But I selected that from the list.

11 is the tag number of the door(s) I want to open, and 20 is the movement speed. The boss monster I've tried to put both the option 'H Script Excecute' (80) or 'H Script Locked Excecute' (83), along with arg0 = 1 (script1) and arg1 = 1 (map01), but the door doesn't open! I did exactly as the tutorial stated. They doors DO have their tags assigned; I've also tried just "common.acs" as well as "zcommon.acs" (though the latter is better anyway) in the script body itself, but nothing works. Anything I can change anywhere would be appreicated.

Share this post


Link to post

It seems you have put the values in the wrong fields.

80 is the code for ACS_Execute. Did you accidentally put that in the arg0 field?

For such a simple action you may as well put the Door_Open action directly into the action special field of the monster.

Share this post


Link to post

No, all the fields were correct. DooM Builder has the proper menus for each field, 80 was not in the arg0 field, just the number '1.' Perhaps DOOR_OPEN itself needs to be different? Probably not, if ZDooM took conventions straight from HeXen.

Share this post


Link to post

Wait a minute. It sounds like you are using a Heresiarch to run a script. That particular monster is rather...funny about running scripts. The numerical command for ACS_Execute is 80, so instead of running the script like usual, it runs script 80. If you were to put in Floor_RaiseByValue, it would run script 23 instead of raising a floor. The best way to solve this is just to renumber the script you want to run from 1 to 80 and it will work.

Share this post


Link to post

I don't get an error anymore (changed the script to 80 instead of 1), but the doors still don't open. I tried just that, and changing the script the Heresiarch runs from '1' to '80' from inside HIM as well. Would it be possible if I sent the map to you? It's virtually finished otherwise anyway - and if by any chance the script cannot work at all the level would be submitted as-is. Tell me what you think! :)

Share this post


Link to post

Now that this is nearly done, I can focus on three things: the project I'm working on with Slyrr, playing Unreal Tournament 2004, and becoming the lord of Hell's Demonic Warriors, a clan for that game, by making a home site for it. Enjoy!

Share this post


Link to post

Ok, I got it and I just tried it. There's just one tiiiinny problem with it.

No player start spots. As a result, it won't run at all. I could easily add them, but I wouldn't know where to put them.

Share this post


Link to post

Huh? How is that possible? I have starts. I'm running it with JDooM btw and I have no trouble... maybe I've exceeded vanilla HeXen engine limitations?

The starts should be on the rightmost side of the map, but just left of the 'fence' barrier. That's the entrance to the town.

Share this post


Link to post

Wait, I just figured the EXACT problem. I accidentally modified my Hexen.wad file itself through Wintex (I had a bunch of extra flats with the mage dying and the cleric somehow while using DooM Builder afterwards). All's you need to do is re-save the level, it should be fine since you have normal HeXen. But I have to re-install HeXen from scratch, THEN save my wad.

Share this post


Link to post

Ok, I tested the map (I put the player start in the center of town near the well which caused the HOM), and it looks nice. I had to fix a few problems though. I recompiled the nodes using Zennode, which removed most of those empty spots. I fixed the script problem (you were using "zcommon.acs" instead of "common.acs". The doors open when he dies now. Because of that, I removed the switch and changed the texture to what the rest of the switch has (PUZZLE4). Finally, I replaced that Quartz Flask there with Bracers.

Share this post


Link to post

Cool, thanks for everything! I can send it to you for submission - I fixed the texture on two walls, so now the level is 99.999% done. I also updated the readme file.

I just need you to rebuild it for me using Zennode, because that always crashes on me with an error for some reason (does that with ANY level I try to make), but you were able to do it. If you can get it to work after rebuilding, put it back in the new .zip I've sent and let'er rip! :D

Thanks for everything, Ichor. You're help was greatly appreciated, and I hope I wasn't a bother with all the favors and whatnot. And you're the coauthor now, btw. :D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×