exit from game

exit from game

Re: exit from game Posted by dragonlady on Tue Aug 1st 2006 at 1:33pm
dragonlady
2 posts
Posted 2006-08-01 1:33pm
2 posts 0 snarkmarks Registered: Aug 1st 2006 Occupation: Computing Lecturer Location: UK
:confused: Hi All - I am new around here and female - please don't shoot me!

I have been searching and reading lots of useful posts, but cannot find the answer to what is possibly a very stupid question.

I have created my first map for HL2 and it more-or-less works OK, but I have no idea how to finish it. There may or may not be more, as I am only doing it as a demo, so I do not want to change levels, just end the game! What I am looking for is some kind of trigger or other object that just takes the player to a "well done you escaped" message and quits. Is this possible or am I missing the point? Hope you can help.

Love Dragonlady
Re: exit from game Posted by Agent_21 on Tue Aug 1st 2006 at 1:40pm
Agent_21
19 posts
Posted 2006-08-01 1:40pm
Agent_21
member
19 posts 2 snarkmarks Registered: Apr 23rd 2005 Occupation: Mapper Location: United States
Well, I absolutely know there is a way to do it. I can not be of much assistance as I am a relitively new mapper as well, but I can reassure you that somone here knows how to do just that, and I have seen it done on other maps, so it is most certainly not a stupid question. Hope you enjoy Snarkpit, the community here is very nice, and you should find them quite helpful.
Re: exit from game Posted by Captain P on Tue Aug 1st 2006 at 4:51pm
Captain P
1370 posts
Posted 2006-08-01 4:51pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
I never investigated what the end game entity is in HL2, but from looking at the source of Metastasis, it seems it can be done by triggering a point_clientcommand entity, using a parameter override of 'startupmenu force'.

But perhaps the game_end entity does just what you want. I'd say, give that one a try and otherwise, try the above method.

Oh, and you should download that Metastasis mod. It's not only a good example of singleplayer mapping, it also comes with the maps source - it's always good to learn by looking at examples, right? :smile:
Create-ivity - a game development blog
Re: exit from game Posted by omegaslayer on Tue Aug 1st 2006 at 6:59pm
omegaslayer
2481 posts
Posted 2006-08-01 6:59pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
I have created my first map for HL2 and it more-or-less works
OK, but I have no idea how to finish it. There may or may not be more,
as I am only doing it as a demo, so I do not want to change levels,
just end the game!
The game_end can achieve this, however it has an abrupt end, you'll
just go straight to the main menu, and its not very dramatic, so I
would pair it with a env_fade that makes the screen fade to black
before you fire the game_end entity.
What I am looking for is some kind of trigger or other object
that just takes the player to a "well done you escaped" message and
quits. Is this possible or am I missing the point? Hope you can
help.
A game_text entity can achieve the message saying "well done you escaped" (in the message text field without the " signs).

So the order in which things should be fired from a brush entity trigger_once:

At 0 seconds env_fade

at 2 seconds game_text

at 4 seconds game_end

You can also go out with a bang if instead of going to the main menu of
HL2 you can load up a back ground map instead. To do that you can use
point_servercommand entity. Use this setup.

(output from whatever triggers it) "on trigger"

(my input)"command"

(parameter) "map background01"

(delay) <time>
Posting And You
Re: exit from game Posted by dragonlady on Wed Aug 2nd 2006 at 3:03pm
dragonlady
2 posts
Posted 2006-08-02 3:03pm
2 posts 0 snarkmarks Registered: Aug 1st 2006 Occupation: Computing Lecturer Location: UK
Bless you guys!

I used a combination of your ideas - the env_fade and env_text suggested by Omegaslayer with the point_clientcommand entity from Captain P - and it works beautifully!

(According to the documentation game_end is only for multi-player games)

Thanks for the help - I obviously need to learn a lot more about entities.