Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buu342

Question on exits

Recommended Posts

Hello, is it possible to have the exit available to the player but will only work if the player has pressed a switch?

Example
The player starts in his bedroom. Inside are a bed and a chair(sitting on it will end the level, but i dont want it to yet). The player must then leave his bedroom, explore the base and must press a switch. When he does, the chair can now make the player leave the map. So basicly the player must return to the bedroom, touch the chair and end the level. Is that possible?

Thanks

Share this post


Link to post

It's possible, but only if you script the level, so you'll have to use ACS or FraggleScript.

Doing so will restrict the number of ports that can play your map.

Share this post


Link to post

If you want to stay within the original engine limits, you could create a invisible wall around the chair that lowers when you have pressed the switch and thus makes the the chair accessible to the player.

Share this post


Link to post

I think it should be possible with voodoo dolls. I'm trying to do it right now.

Share this post


Link to post

There's probably several solutions, depending on the target source port. A voodoo doll on a conveyor with an exit line near the end is one option, pressing the switch in the base removes the first barrier to the exit and returning to use the chair removes the second - I could post a demo wad later. Another option is an ACS script that disables the chair exit until the other switch is pressed, something similar to the example on this page.

Share this post


Link to post

Here is a solution with vanilla actions only - http://speedy.sh/6WPzN/domichek.zip (exit works after you enter the white "teleporter")
The downside is that the player loses 1 HP. It may be possible to make voodoo doll eat one health potion before the barrel explosion, but I need to think about this.

Share this post


Link to post

this is a lot of tedious work for an exact effect, when the basic gist of it is that you want the player to go somewhere, and then backtrack to where he originally was, which can be done a variety of ways. (The original Doom levels are loaded with examples of this!) A switch can operate a door that gives you access to the exit switch, or the switch could be barricaded by a door that requires a key, etc.

Is it absolutely necessary that the exact linedef of your exit switch stays inactive at one point, and usable at another?

And why is everybody so quick to suggest scripts?

Share this post


Link to post

Another idea:

Have two copies of the bedroom, one where the chair does nothing, and a second one where the chair exits the map. Lets say they both sit at the end of a certain hallway.

Initially the 2nd one is closed off. When the player presses the switch, it opens the 2nd bedroom and closes the first. (in fact you probably need a walk line that closes the 1st bedroom, and the switch opens the second). Anyway, when the player finally gets back they probably won't notice travelling a little bit further to get "back" to the bedroom (which is now the 2nd one).

Share this post


Link to post
40oz said:

And why is everybody so quick to suggest scripts?

Because it's the best tool for that job.


On the Hardwareworld forums, someone is asking for the best way to fix a plank to a wall to make a shelf.

"Get a couple of angle brackets, screws, and a screwdriver", says one.
"Wait, instead of a screwdriver, you can use a wrench to grab the screws and then you get leverage to drive the screws", says someone else. "That way, you don't need a screwdriver!"
"Ugh that's too fancy. Just pile up cinderblocks on the floor and lay the plank on the cinderblock piles", interjects the last person. "Why are you so quick to suggest screws?"

Share this post


Link to post

Here's a quick and dirty example using a voodoo doll. The teleport pad represents your chair (which opens the exit door) and the "hidden somewhere in the Base" switch (which is shootable on the near side if you get tired of walking) opens the other door. Being a test map, I've replaced the walkover exit (at the red line) with a teleporter that returns the doll to its start point, so you can run it through those doors as often as you like. The length and speed of the conveyor isn't critical, for your purpose in a real map it could be made slower and much shorter.

Share this post


Link to post

lols, whatever Gez. :P
Vanilla is compatible with so many more source ports than zdoom.

vanilla example - the reddish switch is the exit switch, you can press it repeatedly but it doesn't exit until after you press the wood switch.

Share this post


Link to post

Thanks for your replies. Im not quite sure on which one to use, but i rather do scripting because i don't need to create more things or complicate the way that people exit. im not the best scripter, though i can do things like display messages and cameras, but im not sure on what to do. Anyone help?

Share this post


Link to post

zdoom-compat example - uses an 'actor hits floor' thing, pressing the switch gives the thing the "End - Normal" special (make sure to also tag your chair sector something unique).

Memfis - at least yours looks like a real bedroom. :)

Share this post


Link to post

This page on the ZDoom wiki has an example of a script that ends the level after you've hit some other switch in the level.

Share this post


Link to post
TimeOfDeath said:

zdoom-compat example - uses an 'actor hits floor' thing, pressing the switch gives the thing the "End - Normal" special (make sure to also tag your chair sector something unique).

Memfis - at least yours looks like a real bedroom. :)


thanks! that worked perfectly. I HAVE 1 PROBLEM. When i press the switch, i also wanted to execute a script that would display a message.

Share this post


Link to post
Gez said:

"Ugh that's too fancy. Just pile up cinderblocks on the floor and lay the plank on the cinderblock piles", interjects the last person. "Why are you so quick to suggest screws?"


Doom mapping is not that primitive.

Share this post


Link to post
TimeOfDeath said:


Thanks!
That worked BUT you made some mistakes, thus making the switch not work. You put the script number in map number. Also the script was 239. You only wrote script one. So i just put a one in the map and script number and it worked like a charm. Thanks!

Also could some one help me with this?
http://www.doomworld.com/vb/doom-editing/60007-change-players-skin-without-changing-the-doom-marines-skin/

Thanks! Ill put everyone in the credits!

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
×