back to menu when player dies Created 9 years ago2015-11-16 00:30:39 UTC by komagame komagame

Created 9 years ago2015-11-16 00:30:39 UTC by komagame komagame

Posted 9 years ago2015-11-16 00:30:39 UTC Post #327446
Hi, is there a way to force the game back to main menu upon player death ?

My mod is a timed game with a special ending and I do not want the visual stay there when player dies !

please help me
Posted 9 years ago2015-11-16 03:36:19 UTC Post #327447
I dont think theres a 'trigger on player death' item in HL mapping.

However, you may want to consider using trigger_changetarget to make sure that the special ending visuals are not triggered.
Posted 9 years ago2015-11-16 08:57:01 UTC Post #327449
You CAN trigger things when the player dies afaik.

Read here:
http://twhl.info/wiki.php?id=1081

Basically, give an entity the name game_playerdie, and it will fire when the player dies. You can then use that to run logic that will return the player to the menu, or any other scripting you have in mind.
Posted 9 years ago2015-11-16 13:57:22 UTC Post #327451
That entity could be a game_end or something that distorts the player's view.
Oskar Potatis Oskar Potatis🦔
Posted 9 years ago2015-11-16 22:44:09 UTC Post #327456
thank..but being more specific:

I need to stop a multi_manager with its text entities from flowing whenever the player dies (single-player).

Some detailed procedure ?
Posted 9 years ago2015-11-16 23:32:51 UTC Post #327457
Perhaps a trigger_relay that kills the multi_manager? I've never tried stopping a multi_manager, so I'm just assuming you can.
Jessie JessieTrans Rights <3
Posted 9 years ago2015-11-17 08:19:26 UTC Post #327458
If killing the multi manager directly with a relay doesn't stop it, then kill the entities that the multi_manager targets.

Alternately, set up a unique relay as an intermediary between the multi_manager and each of its targets, and kill those relays to stop the logic.
Posted 9 years ago2015-11-19 22:31:48 UTC Post #327485
Thank Dallas I'll try with your method.. but what entity should I use ?! Even a monster ?

So I name an entity "game_playerdie" and make it fire a trigger_endsection that points to main menu.. ok ?
Posted 9 years ago2015-11-19 22:36:08 UTC Post #327486
difference between "game_playerdie" and "game_playerkill" ?
Posted 9 years ago2015-11-19 22:45:56 UTC Post #327487
I would possibly just fade the screen out in black with a message saying you failed.

Don't force it back to the main menu as it might turn into frustration.
Posted 9 years ago2015-11-21 16:23:21 UTC Post #327501
Help: I named the entity item_security to game_playerdie and made it target to a trigger_endsection as suggested ..but nothing happens when player dies.

Should I use the target or fire command in entity property ?
Posted 9 years ago2015-11-21 18:35:56 UTC Post #327502
Did you enter a section name in the secton property of the trigger_endsection entity? If you leave it empty nothing will happen. Type in _oem_end_logo in the section property and the game should end and bring you back to the main menu when triggered.
Posted 8 years ago2015-11-21 21:48:07 UTC Post #327503
Yes the trigger_endsection works (I've tested)

Issue is with the game_playerdie entity.. what entity should I use ?(item_security did not work)
Posted 8 years ago2015-11-21 23:35:01 UTC Post #327504
Use a trigger_multiple.
Posted 8 years ago2015-11-22 06:47:51 UTC Post #327505
Do you really need another entity? Have you tried naming the trigger_endsection "game_playerdie"?
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2015-11-22 21:58:29 UTC Post #327506
trigger_multiple did not work either(i've used its target field)

nothing left to try.. sigh

I'm forced to change the structure of my mod so the player never dies !
You must be logged in to post a response.