[Info] Special entitynames

Discussion in 'Mapping Questions & Discussion' started by Schinken, Oct 17, 2009.

  1. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    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
    Column 1
    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.
     
    • Thanks Thanks x 8
    Last edited: Oct 17, 2009
  2. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    Ok, I am going to test those game_ entities. those sound interesting


    this code
    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.
     
  3. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    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: Oct 17, 2009
  4. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    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
     
  5. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    15
    I was Demoman and my health got cutted down to 175 -> so 300 is okay it will always fit the players max health :).
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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.
     
    • Thanks Thanks x 3
  7. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    15
    Okay i will fix that :)
     
  8. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    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 :)!
     
    • Thanks Thanks x 2
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    :/ 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.
     
  10. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    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: Oct 20, 2009
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    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* :(