Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

filter_activator_name; boss targeting help

Discussion in Mapping Discussion started by 44 Colt, Aug 19, 2016

  1. Aug 19, 2016
    I don't know if this mapping forum is still used much by people, but I have a problem using a filter_activator_name to selectively trigger a a ze boss phys_thrusters, when a func_breakable parented to a player goes inside it.

    I've tried triggering a simple trigger brush, which outputs **Triggered** to point_servercommand using a func_breakable called Target. The Target gets setparented and setparentattachment to the player when he walks through an intial trigger etc.... as is used in the westersand boss setup.

    Using a filter_activator_name to filter, I've not been able to trigger anything.
    The compile log (error free) and the vmf are posted below. I'd appreciate help from anyone who can spare some time.

    Thanks :smile:

    Compile Log: https://justpaste.it/xft4

    vmf: https://www.dropbox.com/s/w9xml2blyxuz1ue/colttestmap1.zip?dl=0

    PS: this vmf is a simple map to test using filter_activator_name
  2. Feb 24, 2011
    From my experience, using triggers + breakables/physboxes for targeting can be bork (more towards CS:GO afaik).
    I suggest that you don't use a breakable for the targeting, but instead targetname the players themselves.

    > Set up your boss with the physbox, visual aspect, thrusters + thruster triggers
    > Add a trigger for the targeting (keep it filtered to CT's only, i actually suggest that you use a filter_multi that requires the target to be a CT AND NOT have the targetname "bosstarget"):
    - !activator > AddoutPut > targetname bosstarget 0.00
    - !self > Disable 0.00
    - !activator > AddoutPut > targetname nada 7.00
    - !self > Enable 6.90
    - <work out any other events you'd like, such as sounds/animations/etc>
    I picked 7 seconds because that's usually my own "magic" time for efficient NPC targeting.
    Remember that the triggers that control the thrusters need to be filtered by filter_activator_name, where targetname is bosstarget

    Hope that i helped more than causing mayhem
  3. Aug 19, 2016
    Thanks for your quick reply Luffaren. Can I just check something?

    If you want to have a materia type item system can you use the target name system for both that and the boss targeting?
    Would the targetname screw up the materia-style targetnames?
  4. Feb 24, 2011
    They would unless you work around it with a few tricks.
    Enviolinador taught me a neat yet simple trick recently:

    You can run different targetnames and use filter_multi for different systems.
    Let's say that we have 1 boss and 2 items:
    - Fire
    - Ice

    The boss will give the players the following targetname:
    bosstarget (on target)

    Fire will give:
    fireitem (on pickup)

    Ice will give:
    iceitem (on pickup)

    So when the boss targets you, instead of overwriting the targetname (from fireitem to bosstarget for example)
    You'd first check:
    > Does the player have the targetname "fireitem" or "iceitem"
    IF YES
    - Set the players targetname to either "fireitembosstarget" or "iceitembosstarget"
    - Set the players targetname to "bosstarget" as per usual

    Then you basically need the items/boss having a filter_multi to accept most of the combinations of targetnames.
    You'll end up with quite a bunch of filter entities after some extra work, but it should work out.

    Though i'll warn you, i did this on my recent map and ran into a small issue:
    > Player gets targetnamed (for 7 seconds)
    > Player picks up item within these 7 seconds, sets a targetname both compatible for the item + npc
    > Player gets targetnamed back to a default targetname, making the item not work
    This would be an easy fix if running delayed TestActivator on filter entities would work. I might have been living under a rock, as it might be fixed (for GO at least), so don't trust me completely.
    I basically told the players to drop > pick up the item again, as they'll regain their itemname.

    If you're doing this for CS:GO you can utilize Vscripting for making things easier, less filters to test as you can do a while bunch of it in code.
    You can basically check "does the players targetname contain THIS/THAT" and remove/add "THIS/THAT" on demand.
    I've completely converted my item filtering to Vscript based stuff, as it's more accurate/less fiddling with targetnames.
  5. Mar 30, 2013
    Delayed TestActivator will crash whole server if the player disconnect before it is done.

    If you want a delayed TestActivator you gotta AddOutput on the player the OnUser1 filter:TestActivator::0:1
    And FireUser1 on him.
    • Mapping King Mapping King x 2
    • Feb 24, 2011
      Ah so it's not any different in GO, bummer boogers.

      Oh man, i sure am a nub mapper. I've never done anything like this before so i figure that i'll ask you all my concerns in this thread.
      I usually diddle the FireUser commands to !self kill ents, assuring that no double-killing is called which has caused crashes for me in the past. Not sure if that's still a thing though.

      So how would this work? I guess you can attach the OnUser output on the player itself by doing something like:

      The AddOutput parameter looks pretty straightforward, i also read on the Valve wiki:
      The format goes:
      <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
      the "::" would mean that there's no parameters if i'm right?

      I'm kinda confused about this whole thing though. What would happen if the same player triggers the OnTrigger twice(or more)?
      Would the output (OnUser1 filter TextActivator) get added in multiples?
      Is that why you put the "1" in max times to fire? Since the output gets deleted after that and all.

      Also, let's say that you have more than 4 filters to test in this case. You'd run out of OnUser commands.
      I kinda guess that you should basically just run some kind of mass-filter check, starting with only one filter TestActivator from the player?
      The more items, the more of a mess you'd get i assume.

      If you're diddling CS:GO stuff i personally suggest that you try out Vscript. I've made an easy to use item filter script that doesn't require targetnames at all.
      There's a how-to-use inside the script description, which should be easy enough to implement.

      Attached Files:

    • Aug 19, 2016
      Actually I should have mentioned, its for source not GO. But I might move to GO later so thanks :smile:
    • Mar 30, 2013
      Ye like this.

      Ye, because there is no parameters, it's double ::

      Normal output in the vmf file work pretty much the same.
      In css and other old games: OnTrigger door,Open,,<delay>,<1 or -1 = once or infinite>
      In csgo: the same but the "," is replaced by some black ESC character.

      An example where we use a parameter with AddOutput is for the worldspawn level system (func_brush, info_target can also work).
      OnSomething worldspawn,AddOutput,OnUser1 Level_Counter:SetValue:1:0:1,<delay>,<once-inf>
      The system use worldspawn to store a value of a counter, to re add it to the counter, that translate it (via a logic_case) into the current level.

      He would get AddOutput more than once, so OnStartTouch might be a better solution.
      The 1 mean the output is only once, if you put -1, the output will stay for the whole map as the player is a permanant entity. So once you FireUser1, the output is fired and then removed.

      Depending of how you use your item system, you could only use OnUser1. Some maps store Item Levels with OnUser1, so in that case, not to mess with the items, you just use OnUser2.
      You wouldnt need to use all OnUser for filter testing.

      An example:
      I use OnUser1 for level items
      I use OnUser4 for permanant output that get fired by the map OnMapSpawn or depending of the level (like giving speed to the winners of a level)

      So you can just use OnUser2 or 3 for the filter testing.
      • Informative Informative x 1