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

~ZDoom/SkullTag Door Functions~

Recommended Posts

I need help with doors that you:
<Edit> This is meaning Zdoom- Doom in Hexen, and SkullTag already in form. highly Appreciate a screenshot of what you mean so it makes it SO MUCH easier.

Open with Keys.

Repeatedly press use and door goes up and down like the doors on Doom 2 (Not gunshot).

One where it needs 2 keys to open a door (This will help me if I want to add it for ALL 6).

Share this post


Link to post

... Well, it's been over 4 hours since I started this, but I REALLY need help as Doom in Hexen Format Doors are FAR more complicated then the ones when I ran off of Doom95.

Share this post


Link to post

heres a quick code that will do normal doors, just link each door to the script:

script 2 (void)
{
Door_open(0, 25);
delay(175);
Door_close(0, 25);
}
pretty simple script

now heres one that will open a door once you have a key using the checkInventory command (I use this instead of acs_lockedExecute just because its easier to read)
script 24 (void) //blue door
{
setfont("bigfont");
if (CheckInventory("BlueCard"))
	{
		hudmessage (s:"Blue level clearance accepted."; HUDMSG_TYPEON, 1, CR_WHITE, 0.5, 0.9, 1.0, 0.05, 1.0);
		Door_open(0, 25);
		delay(105);
		door_close(0, 25);

	}
	else
		{
		hudmessage (s:"Blue level clearance required."; HUDMSG_TYPEON, 1, CR_WHITE, 0.5, 0.9, 1.0, 0.05, 1.0);
		}
}
It will need a blue key and will only open if you have it.

HTH

-Steeveeo

Share this post


Link to post

Ty, I'm going to wait a tide bit longer for some more help and see what anyone else uses for doors, for example, like people of who:

Dutch Devil: He makes perfect levels pretty much, it's only I don't see very much slopes, but not the case.

Bloodskull: I choose him as he is also a great mapper, if he uses Zdoom or something AS close, he could be a help with doors, I've already gotten landscape design. http://www.doomworld.com/vb/showthread.php?s=&threadid=39487 = Why i chose him, look at his screenshots for this project.

Fisk: Same with Bloodskull, both have great screens and seem to have Door making on a easy course.

I'll stop here with the names, if theres a mapper that I have not heard of and makes just as good or better maps, tell me, pm me though, don't want people flaming me.

Share this post


Link to post
Steeveeo said:

heres a quick code that will do normal doors, just link each door to the script:

script 2 (void)
{
Door_open(0, 25);
delay(175);
Door_close(0, 25);
}



Pretty redundant script. Why not simply use Door_Raise(0, 25, 105) to do the same effect?

And for locked doors there's Door_LockedRaise - although that only prints the standard messages like 'You need a blue key...'.

@Mithral_demon: If you want to see how doors work in ZDoom-Hexen format why don't you just download a map and look for yourself? A WAD like Dark 7 for example should give you more than enough examples of doors and other stuff you might need.

Share this post


Link to post

didnt see that in the codebase on the Zdoom wiki, so I went for door_open door_close. Plus its easier to just comment out the door_close line if I want my doors to stay open for some reason...

@MD: What the hells wrong with what I just put up? It works perfectly and if you dont want it to close just comment the door_close line!


Just goes to show you that its sometimes not worth it to help people...no gratitude whatsoever...

Share this post


Link to post
Steeveeo said:

@MD: What the hells wrong with what I just put up? It works perfectly and if you dont want it to close just comment the door_close line!


Just goes to show you that its sometimes not worth it to help people...no gratitude whatsoever...


Sorry bout that, I couldn't get back to this as fast, I'm going to try out your script, and i'll wait for others ideas about doors too, k? Just don't overload.

Share this post


Link to post
Steeveeo said:

heres a quick code that will do normal doors, just link each door to the script:

script 24 (void) //blue door
{
setfont("bigfont");
if (CheckInventory("BlueCard"))
	{
		hudmessage (s:"Blue level clearance accepted."; HUDMSG_TYPEON, 1, CR_WHITE, 0.5, 0.9, 1.0, 0.05, 1.0);
		Door_open(0, 25);
		delay(105);
		door_close(0, 25);

	}
	else
		{
		hudmessage (s:"Blue level clearance required."; HUDMSG_TYPEON, 1, CR_WHITE, 0.5, 0.9, 1.0, 0.05, 1.0);
		}
}
It will need a blue key and will only open if you have it.

HTH

-Steeveeo


Would this also apply to putting Red instead of blue? And would I switch 'BlueCard' to 'BlueSkull' if I wanted to use the Skullkey form?

Share this post


Link to post

yeah, it will also work for any inventory item, anbd thats also why I use this script instead of door_locked or acs_lockedexecute.

You could make a door that someone can only get past if they have the SSG or somtm if you wanted to!

Share this post


Link to post

Hmn, I tested it out, it worked!(Used a test map-Not the one i'm working on), and then I used that same one, made another door and used the 'Generic' Door, though it doesn't do the repeat use making door go up and down, I set the following:

Sector Tag: 2
Movement Speed: 30
Type: (Don't know WTF that is...) 0
Delay: 20
Lock: 0 (1-3 for Cards, 4-6 for skulls, don't know why 7 couldn't of been ALL 6 keys)

Later, since I found this out, i'll experiment and make decent levels, just not as great as Dutch's or the ones I listed who could help if using ZDoom based doors. But i'm happy enough that Generic works.

Share this post


Link to post
Steeveeo said:

You could make a door that someone can only get past if they have the SSG or somtm if you wanted to!


Mwuahah, Evil evil evil! I could purposly set it to Chainsaw and set it to like lvl 10 as in beginning chainsaw best used when your conserving that lovely ammo!

Share this post


Link to post

or make it so (with a little bit of custom DECORATE coding) that they have to find TEH AL MAGICL CHEEZ WHEEL!!!1!


y'know....maybe not....


BTW its also possible to call on several items in my example script

think its somtm like the format (correct me if Im wrong):

if(checkInventory("ItemOne") && checkInventory("ItemTwo"))
{
//stuff
}
else
{
//other stuff
}

zat right?

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  
×