[Info] Special entitynames

  • If you're asking a question make sure to set the thread type to be a question!

Schinken

L1: Registered
Aug 6, 2009
33
15
First of all, i am not sure if this already exists, if yes please delete this thread :).

Okay let's begin:

Target Activators


Only green ones are useful for multiplayer

Use these as targetnames, or outputs


As a targetnames for an entity, if you don't have more information about something.
  • !player - This is used to target the player itself, use !player for singleplayer (not very useful for TF2 ;)) and Player in Multiplayer games :) (TF2 friendly)
    [*]!caller - This one targets the activator of the current entity, for example is a player shoots at a breakable object, you could ignite him with !activator
    [*]!activator - This targets the first entity that called a row of entitiys, e.g. ent_a calls ent_b which calls ent_c which calls !caller, now ent_a is called ;) very easy
  • !self - The target is the same entity that is specified in the targetname
  • !pvsplayer - Targets the first entity which is found in the current PVS*
  • !speechtarget - The target is an entity, which builds a virtual visual line (direct line from ent to ent there has to be a clear line of sight) though i am not sure :s
  • !picker - This one targets the entity the player is looking at (Only Solid entitiys ;))

*PVS -> Potentially Visible Set


Name Activators

Use these ones as entity names(!)

game_playerdie
game_playerkill
game_playerjoin
game_playerspawn
game_playerleave


I think i don't have to say much about it, if for example a light entity is named "game_playerdie" you could toggle it off and on everytime a player dies :).

And just one thought of me, you could build a huge trigger_multiple around your map, name it game_playerkill and as output use

Code:
OnTrigger -> !activator -> SetHealth -> 300

To give the killer full health back :D.

I'm not sure if it works, I can't test it now, Steam is Validating Game Cache :/.
Okay, maybe someone of you could try it :D.

Also i am to stupid too use
tags o:.

Okay i hope you like it, if you find out something doesn't work or some grammar is not correct, please tell me :D.
 
Last edited:

martijntje

L8: Fancy Shmancy Member
Aug 2, 2009
539
334
Ok, I am going to test those game_ entities. those sound interesting


this code
Code:
OnTrigger -> !activator -> SetHealth -> 300
doesnt work. I am pretty sure you can't get back alive right after you died.

setting you health to 300 only works for heavy, if you use a number higher than your max base health it won't do a thing. wich is quite a shame as I would love to overheal people.
 

Schinken

L1: Registered
Aug 6, 2009
33
15
That was what i wanted to do :)
Give the "KILLER" :)P) full health back, so -> 300 is max health for every class o:.

E: Btw. Steam has finished :) testing it now too

E²: Well yeah :D It doesn't work like the way i wanted it, but for rocket/stickyjump maps it's great, it recovery your health all the time, nearly every 0.25seconds or so :D InstaHealth x_X faster than a resuplly locker
 
Last edited:

martijntje

L8: Fancy Shmancy Member
Aug 2, 2009
539
334
That was what i wanted to do :)
Give the "KILLER" :)P) full health back, so -> 300 is max health for every class o:.

E: Btw. Steam has finished :) testing it now too

ok, killer makes sense.
sethealth 300 doesnt work for any other class than heavy.

the workaround:
sethealth 95
sethealth 125
sethealth 175
sethealth 200
sethealth 300
 

Schinken

L1: Registered
Aug 6, 2009
33
15
I was Demoman and my health got cutted down to 175 -> so 300 is okay it will always fit the players max health :).
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
The game event triggers will not work. They are leftovers from goldsrc's old target>targetname system and have no means to be linked into source's IO system.

For the special targets... the only ones useful in TF2 are !activator and !self. There are a scant few possibilities to use !caller, but there are a lot of entities that don't support it. !picker can be handy sometimes with ent_fire debugging, which is I think the only place it works anyway. All the others have no application in muliplayer.

That said... you have !caller and !activator mixed up. !activator returns to the FIRST in a chain, !caller returns to the PREVIOUS.
 

Washipato

L3: Member
Jun 22, 2009
149
331
The game event triggers will not work. They are leftovers from goldsrc's old target>targetname system and have no means to be linked into source's IO system.

I tested the "name activators". They actually works. You can even filter the activator.

It seems that when one of those events take place, they call the "Use" input, so the target entity must have an "OnUse" output. The trigger brush has one, so I tested with that, naming it game_playerkill. The trigger calls a filter_activator_tfteam when activated to see which team killed the player and then add one to the counter of the killer's team.

Here's the vmf I created to test it. You will need the engineer counter's materials too see the textures on the wheels

event-test

This can be VERY useful, at least for me. Thanks a lot Schinken :)!
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
:/ I knew that the events would try to fire OnUse, but back when I was testing them I searched high and low on the wiki and everywhere I could think of for an entity that had OnUse but never found one. Never heard of trigger_brush.

Good to know I guess.
 

Washipato

L3: Member
Jun 22, 2009
149
331
I found it from the wiki, searching "OnUse". Other entities that worked before I found that one was func_physbox_multiplayer (with the "OnPlayerUse" input) and a locked func_door (with the "OnLockedUse" input).

Trigger_brush is not in the FGD, you can add it for your resource pack. But I guess it has no use except for being "Use"d : /
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
That's actually what I did, I searched for OnUse... and according to the page history it was there when I did it. I guess it comes down to another failure of the mediawiki search engine. *makes note to self to always use google site-search* :(