special entity "game_playerdie&quot Created 8 years ago2015-11-24 22:37:43 UTC by komagame komagame

Created 8 years ago2015-11-24 22:37:43 UTC by komagame komagame

Posted 8 years ago2015-11-24 22:37:43 UTC Post #327532
Please help:
How this special entity should be used and set up ?
Is it only for multiplayer ? Because it did not work in single-player
Posted 8 years ago2015-11-25 15:06:52 UTC Post #327539
There's no entity class called "game_playerdie". "game_playerdie" is supposed to be the targetname of an entity. When a player dies, either in singleplayer or multiplayer, any and all entities with their targetname set to "game_playerdie" will be triggered.
Summary: there's no entity with this classname, it's a special targetname. Valve likes to hardcode targetnames to do funny stuff sometimes.
Dr. Orange Dr. OrangeSource good.
Posted 8 years ago2015-11-25 16:44:17 UTC Post #327540
Thank but for me this game_playerdie is a legend !
I tried many entities, named them game_playerdie but nothing happens when player dies :(

trigger_multiple, multi_managers, monsters.. all failed
Posted 8 years ago2015-11-25 17:30:58 UTC Post #327542
I just had a look at the game code. Unfortunately game_playerjoin, game_playerleave, game_playerdie and game_playerkill only work in multiplayer mode. The only exception to the rule is game_playerspawn.
Oskar Potatis Oskar Potatis🦔
Posted 8 years ago2015-11-25 17:54:06 UTC Post #327543
Ah that explains why I couldn't make it work earlier today when I created a quick test map to test game_playerdie.

I will go ahead and update the Special Entity Names page on the Half-Life Entity Guide with the information you've provided, potatis. :)
The Mad Carrot The Mad CarrotMad Carrot
Posted 8 years ago2015-11-25 18:06:23 UTC Post #327544
nooooooooooo.. now I have to modify whole the logic in my mod :(

thank potatis, at least I'll not spend any more time on that!

But what about modify the code for single-player as well ??
Posted 8 years ago2015-11-26 12:21:28 UTC Post #327551
there is probably a complicated work around hack to check if the player is alive.

Something like:
  • Cover player traversible space in large trigger_multiple(s)
  • have trigger multiple target a counter and re-set it to 0 ( do this every second by setting the delay before reset on the trigger multiple to 1).
  • Every 1.5 seconds increment the counter in any method you choose.
  • When the counter reaches some number (like 2 or 3) target the player has died entities.
Essentially the player being alive would be resetting the counter to 0 so that the death sequence can only play when the player is dead and no longer resetting that counter to 0.

you could compress the timings, and the counter to smaller time frames, but it would have a great chance of errors (perhaps)
Posted 8 years ago2015-11-28 17:25:01 UTC Post #327581
Thank Dallas.. but listen:

Is it possible to stop a multi_manager from flowing when player dies (single_player) ???
Posted 8 years ago2015-11-30 10:26:01 UTC Post #327595
Assuming you want to stop, and not pause a multi_manager:

If you have a method to fire logic when the player dies (perhaps try the method with trigger_multiples and counters I mentioned above) then yes, you can do that.

It will be complicated but it would work:
My memory is that killing a Multi_manager causes a crash, so....

The basic idea would be that you put something between your multi_manager and the things it is targeting which can be switched off.

So your multi_manager(MM) should be set up like this for each output:

MM --> Trigger_multiple ----> Thing you want the MM to target.

(you could use lots of things in place of that trigger_multiple, take your pick, but use a new unique trigger_multiple like entity for each output the MM is making).

Now, once your MM is all set up and running fine with that method do this:

When the player dies, use multisource(s) to lock and disable all of those trigger_multiples you made. By doing that, the MM will effectively be stopped.

Alternately, you can kill them with trigger_relay's, but they wont work again until you reload.

lastly, you could theoretically pause the action by not using a MM at all, and just making a string of triggers and entities that go from one to another.
Posted 8 years ago2015-11-30 13:08:23 UTC Post #327597
As of now it's impossible execute commands when player dies.. sad but true

In my mod when player dies the visual stay there and game_text entities keep running .. but I don't want that !
Posted 8 years ago2015-11-30 13:48:26 UTC Post #327600
Did you try this:

[quote]
there is probably a complicated work around hack to check if the player is alive.

Something like:
  • Cover player traversible space in large trigger_multiple(s)
  • have trigger multiple target a counter and re-set it to 0 ( do this every second by setting the delay before reset on the trigger multiple to 1).
  • Every 1.5 seconds increment the counter in any method you choose.
  • When the counter reaches some number (like 2 or 3) target the player has died entities.
Essentially the player being alive would be resetting the counter to 0 so that the death sequence can only play when the player is dead and no longer resetting that counter to 0.

you could compress the timings, and the counter to smaller time frames, but it would have a great chance of errors (perhaps)[/quote]
Posted 8 years ago2015-11-30 22:43:38 UTC Post #327605
uhm.. all traversible space is already occupied by a giant trigger_teleport.. could create conflicts with these trigger_multiples ?

Can I overlay more triggers ?
Posted 8 years ago2015-12-01 13:11:42 UTC Post #327610
You can put as many entities as you like in the exact same space/coordinates.

You need to work on a way to get an entity to trigger/fire when the player dies. Once that happens, you can accomplish any version of the things you have been asking for.

What I wrote above was just one hacky method I thought of, there are certainly others that might be worth trying as well.
You must be logged in to post a response.