DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Help] New locked door that only opens once?
Page 1 of 1
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
nova
Guest



Last Visit:





PostPosted: Thu Sep 25, 2003 10:24 am
   Subject: [Help] New locked door that only opens once?
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

A friend of mine, asked me a good question. Would it be possible to make
a new type of locked, door that could be used only once?
Bernt.
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 17 Jan 2020

Topics: 58
Posts: 2272
Location: Canada
blank.gif

PostPosted: Thu Sep 25, 2003 12:42 pm
   Subject: New type of skeleton key.
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sure, that should be pretty easy; considering all you'd have to do is make the player lose the key once they open that door. There's already 4 different kinds of locked doors programmed into wolf3d... so all you really need to do is replace an object's state (walkthrough, solid, health, etc.) with the bo_key3 action or change one character with a hex editor; than look for where the locked doors are opened (the OperateDoor() function in WL_ACT1.C would be my guess?), and add a line of code that contradicts the GiveKey(check->itemnumber - bo_key1) action in WL_AGENT.C. Mind you, I'm just making educated guesses here; I don't really know if any of this is intelligent...

Of course, you could have meant that you want an unlocked door that would only turn into a locked door after you open it. There's alot of ways to do that, one weird idea that comes to my mind is using the function that makes a guard drop ammo to make the door drop a solid, invisable object as it closes. Giving you the third key right when you start could work, but that's only if there's only one of those doors in the level. I'm sure there's a better idea (like somehow spawning the door into a different type), but I'm sure someone else here would be more interested in figure out a solution like that. Wink
jamez
I am Death Incarnate
I am Death Incarnate


Joined: 16 Mar 2003
Last Visit: 17 Jan 2019

Topics: 13
Posts: 186
Location: Yorkshire, UK
uk.gif

PostPosted: Mon Nov 03, 2003 2:21 pm
   Subject: Re: New type of locked door.
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

You could make a new state like gamestate.doordead in wl_def.h and when the door opens you could have some code like so:

gamestate.doordead = 1;

and then before whereever the door opens (i dont have code on me so bear with me) you could write:

if(gamestate.doordead<1)
{
< opendoor part >
}

i dunno if this is any use lol

_________________
~ James
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Sticky: [Info] Help for newbie coders! C++ Tutorial
Author: Dugtrio17
20 11505 Sun Jan 10, 2010 12:26 pm
Fragstein3D View latest post
No new posts [Help] Setting RocketLauncher: Explosive Range...?
Author: KyleRTCW
17 7534 Thu Jun 03, 2004 3:21 am
Codetech84 View latest post
No new posts [Help] Berserk mode
Author: wolf3dbreaker
2 2548 Tue Feb 03, 2004 11:01 pm
Xarkon View latest post
No new posts [Help] Larger than 64x64 Maps
Author: Codetech84
11 4383 Mon Oct 27, 2003 1:04 pm
Guest View latest post
No new posts [Info] Adding Locked Doors
Author: Guest
3 248 Thu Apr 17, 2003 6:30 am
Ripper View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group