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       

[Info] Adding a Second Elevator or End Level
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
Xarkon
DieHard Guard
DieHard Guard


Joined: 05 Jun 2003
Last Visit: 19 Apr 2006

Topics: 18
Posts: 203
Location: West Australia
australia.gif

PostPosted: Wed Feb 18, 2004 3:31 pm
   Subject: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I would like two differnt elevators, one like a gate for outside episodes,and one as the original building hing! Does any 1 know how to do this?
Joel Corrigan Cheesy Grin

_________________
Trying is the first step to failure
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 12 Sep 2019

Topics: 57
Posts: 2238
Location: Canada
blank.gif

PostPosted: Thu Feb 19, 2004 7:21 am
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You can try giving an object the bo_spear quality (in wolf3d, it just acts like an elevator switch when you walk over it), and than... if you want, just turn the object practically invisable (with one dot of gray at the bottom) so that people won't notice it when they try to run past the gate. To do that, just open WL_ACT1.C and change the object of your choice at the beginning of the file to something like this:

::: CODE :::
{SPR_STAT_41,bo_spear},

If you want them both to be an elevator switch, open up WL_AGENT.C and look for the line with ELEVATORTILE; and change it to something like this:

::: CODE :::
if (!buttonheld[bt_use] && (doornum == ELEVATORTILE || doornum == 30) && elevatorok)

The '30' can be whichever wall you want to use for the "extra" elevator switch. 1 is "Gray Stone 1", 2 is "Gray Stone 2", etc. Once your flick the switch, the data for that block will transform into the next one in the series -- making the picture change, so it would probably be wise to pick an area where there's two E/W walls in a row that you're not using (to make the two "before and after" graphics)... unless you feel the desire to change the "tilemap[checkx][checky]++" to something else.

Hope that helps. Smile
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 19 Sep 2019

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Thu Feb 19, 2004 9:42 am
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Or else you can create that is not a sprite.
Insert the following code in to the WL_AGENT.C file
Quote:
/*
===================
=
= ExitLevelTile
=
===================
*/

void ExitLevelTile (void)
{
playstate = ex_completed;
}
Before the Victory Tile code
The go down to the Trust code and add
Quote:
if (*(mapsegs[1] + offset) == EXITTILE)
VictoryTile ();
if (*(mapsegs[1] + offset) == EXITLEVELTILE) <-code added
ExitLevelTile (); <-code added

And then you should also assign an object no for it in the WL_DEF.H
Meaning a SpawnRoutine ( hope you understand what I mean)
Here's an example if you don't
Quote:
#define EXITTILE 99 // at end of castle
#define EXITLEVELTILE 337 <-- code added

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 12 Sep 2019

Topics: 57
Posts: 2238
Location: Canada
blank.gif

PostPosted: Thu Feb 19, 2004 9:57 am
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Heh, I thought about adding a new #define to WL_DEF.H at first too; but just changing that one line to have a "|| doornum == 30" in WL_AGENT.C (originally explained) to get the second elevator switch is easier. Why code an extra ExitLevelTile() function to do something that's already available?

I guess it just depends on how you like to organize your stuff. Wink

EDIT: Ah, I think I see what you're really doing now Haasboy. You're trying to add a new static object that has no picture and makes you beat the level when you walk over it... correct? I'll have to try this idea of yours out; sounds interesting.
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 19 Sep 2019

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Thu Feb 19, 2004 10:33 am
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris Wrote
Quote:
You're trying to add a new static object that has no picture and makes you beat the level

Yes you're corrent, but it's not a sprite it is a trigger like the Game ending trigger which causes B.J to run and jump and scream yeh, but it only cause the level to end. Geek

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Xarkon
DieHard Guard
DieHard Guard


Joined: 05 Jun 2003
Last Visit: 19 Apr 2006

Topics: 18
Posts: 203
Location: West Australia
australia.gif

PostPosted: Thu Mar 11, 2004 9:01 pm
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanx for helping me dudes! but wait there's more!!

I understand what u are doing in the code, but you are suggesting the "endgametrigger" where BJ screams YEAH! I dont want that!

Chris I'd like to have that second bit of code you wrote in ur first post, does it work though?? can U check it for me please??...

Thanx dudes!

Joel Corrigan Very Happy

_________________
Trying is the first step to failure
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 12 Sep 2019

Topics: 57
Posts: 2238
Location: Canada
blank.gif

PostPosted: Fri Mar 12, 2004 3:14 am
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yup, the second code works. Try plugging it in, and than clicking on the wall you've chosen. It's pretty fun having two totally different walls to beat each level with. Smile

Haasboy's idea is pretty nice if you want to walk over a floortile to beat the level (much better than my first idea). If anyone wants to use it, you can simplify his three steps into one by writing something like this below VictoryTile() in his example:

::: CODE :::
if (*(mapsegs[1] + offset) == 100)
   playstate = ex_completed;

Now the object right after the endgame trigger (which was 99, or 63 in hex) in Mapedit will be the LevelEnd trigger. Both ideas are interesting, it just depends on what you're trying to do... I guess. Wink
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 19 Sep 2019

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Fri Mar 12, 2004 1:40 pm
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You have to do those three steps or else the intermission screen and the statusbar on the next level are all screwy. I've tried it with that one step, its better with the three steps. Twisted Evil

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 12 Sep 2019

Topics: 57
Posts: 2238
Location: Canada
blank.gif

PostPosted: Fri Mar 12, 2004 3:59 pm
   Subject: Re: Making two Elevators
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That's interesting Haasboy. Do you mind if I try out the 'one step' you used, and if you try out mine? It works fine here.

I am curious to see how you got the status bar/elevator to get all screwy. I don't see how putting it into this one step would do this, if you did it correctly - it just lets you run less code to do the exact same thing.

Well, as I said... I encourage you to try the code I posted Haasboy, and to post yours so I can try it out. Whatever the outcome, it would be fun to hear each others results. Wink
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 19 Sep 2019

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Sat Mar 13, 2004 1:42 pm
   Subject: Re: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

The one step code is exactly the same code as what you gave, I have no idea, what caused the graphics to become screwed up.

But if you also look at iD Software game ending trigger I'm sure they also tried it with a one step process, but changed it to three...
...I tried the one step process, but it was good, only after changing to a three step it worked 100%. :idea:

-Consecutive Post AutoMerged- Added:

Ok I had a look at my code, to see what the one step code was and here is what I origanily added
::: CODE :::
   if (*(mapsegs[1] + offset) == EXITLEVELTILE)
      playstate = ex_completed;

And again the EXITLEVELTILE was defined in WL_DEF

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Tue Jul 05, 2005 10:20 am
   Subject: Re: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Oooouhhh...guuuuuuys...where to put the EndLevel Trigger's routine in the code? Could somebody show me the environment of the modified code?
Also how can I add a symbol to EndLevel Trigger in Mapedit below or above the EndGame trigger?

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 12 Sep 2019

Topics: 57
Posts: 2238
Location: Canada
blank.gif

PostPosted: Tue Jul 05, 2005 5:21 pm
   Subject: Re: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Man, is it ever weird going to a thread you thought you've never seen before... and seeing your own name posting comments. It's like watching a movie you thought you never seen, then 3/4s of the way through, you're like: "woah, that whales name is Willy, just like on Free Willy!" and your roommates are like "You IDIOT, this IS Free Willy!". Of course, you don't believe them, and keep watching the movie until you get to the point where the whale is jumping over the rocks at the end, and you finally clue in and are like: "oh yeaaaaah! I remember this!". I still always forget that the guy on Sixth Sense is dead until I get to the end too (ask Hair Machine). Laughing

But anyway, I think there's a more recent version of this idea; if you were curious:

http://diehardwolfers.areyep.com/viewtopic.php?t=2397

[Lloyd] The definitions should be pretty easy to figure out by playing around with objdata.wl6 or reading the mapedit document. [/Lloyd]


Last edited by Chris on Tue Jul 05, 2005 5:49 pm; edited 37 times in total
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 13 Sep 2019

Topics: 46
Posts: 2335
Location: USA
usa.gif

PostPosted: Tue Jul 05, 2005 5:43 pm
   Subject: Re: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Chris: Yeah, I know the feeling. In the first post in the other thread I say "There might also be a tutorial somewhere also" and somehow I'm watching the thread that *IS* the other tutorial and didn't realize it until now. Laughing

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 14:28 ago.

Topics: 167
Posts: 8428
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Jul 05, 2005 7:31 pm
   Subject: Re: [Info] Adding a Second Elevator or End Level
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

The way I'd approach this sort of code idea - if both exits were elevator switches - would make the second outside level be read as a "secret level" in the code, only the outside level isn't a secret level, just a different level than the first elevator sends you to. So the floor of the second elevator would be labelled "6B" rather than 6C-8F. That would already be defined in the map editor if you did such a thing.
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 11291 Sun Jan 10, 2010 12:26 pm
Fragstein3D View latest post
No new posts [Info] Tricks - Dogs that shoot - Modifying Behaviour
Author: Guest
19 288 Sat Mar 20, 2004 7:31 am
Dugtrio17 View latest post
No new posts [Info] Alarm Sounding in game?? WSJ...??
Author: Guest
7 311 Tue Jun 17, 2003 10:04 pm
Reivax44 View latest post
No new posts [Info] Silent Gun? - Adding a Silencer
Author: Guest
4 194 Fri Apr 18, 2003 8:34 am
BrotherTank View latest post
No new posts [Info] Adding Locked Doors
Author: Guest
3 244 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