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.

Problem with score-based filter.

Discussion in Mapping Discussion started by Captain Jack, Aug 4, 2013

  1. Apr 25, 2013
    Hey guys,

    Im trying to make a score-based filter for pickable items (like on minas, skyrim, lila escape...). I have some issues.

    What i have done : I have a filter_name (level1_filter , the target : "level1"), i have a trigger at the end of the map ( !activator targetname level1) and the entity that add 100 points (env_score something like that). All works fine.

    What is the problem? When the next round start, i am level 1 , i can pickup the level-1 item (which also have a filter_name ) but if i die during the round, i'll not be able to pickup the item again.

    I think the item filter "overwrite" the level filter. So how a player can have more than 1 filter ?? Is it possible to have 3 targetname assigned to 1 player?? last question, how to "clear" filters at the start of a round ?
    • Mapping King Mapping King x 1
    • Mar 8, 2013

      you can use a logic_auto OnMapSpawn to rename any targets that need to be "cleared". dunno if that's what you mean. I need a better explanation of exactly what you're trying to do.
      • Informative Informative x 1
      • May 27, 2012
        Although I am not exactly sure on what you are trying to do, you could use a filter_multi to allow multiple filters to use the same triggers.

        As for clearing filters on round start, just make a trigger at spawn that does !activator targetname default.
      • Jan 11, 2011
        You can't have multiple filters, as other filters (like Filter_Class) end crashing the server and causing issues, so only Filter_Name is available. And yeah, obviously when you give a new Target Name, you overwrite the previous one.
        The solution to your problem is quite simple, but requires 1 new Trigger per each weapon. I'm assuming you want to filter them so only the owner can use them (like in Mako Reactor). So it would be something like this:

        - When he wins the round, he gets named "Lv1" and 100 points are given to show to others (and himself) what level he is.
        - When the round starts, he is still called "Lv1", as names stay in between rounds.
        - When he picks the Fire Materia (for using Mako examples), that requires "Lv1", he gets named "Fire" (removing "Lv1" name).
        - When he dies and/or a new round starts, there is a trigger at the begging that names everyone called "Fire" (or "Wind" or "Electro") as "Lv1".

        This way doesn't support people having Lv2 and being able to pick Lv1 items as it is, but you can arrange that with more triggers and some AddOutput lines.

        And for your "last question (which I kinda answered already) you clear filters at the start of the level with triggers that rename people (I suggest using "player" as the new Target_Name, which is the default player's name).
        Most maps with filters only have 1 filter, for Item (Mako Reactor) or for Level (Minas Tirith).

        (Notice that items triggered with Game UIs don't need a filter, as only the Game UI owner will be able to activate it; but I personally don't like them, as they are laggy for most players; and I personally find them "harder" or less intuitive to use than pressing a button).
        • Agree Agree x 1
        • Mapping King Mapping King x 1
        • Apr 25, 2013
          I expressed myself badly (this is what happens when I try to speak English without google translator). In my map, there are two types of items: the item attached to a gun (pickable item) and item attached to a knife (characters). The technique of Kaemon allowed me to partially solve my problem by using a game_ui + logic_relay instead of a button for the characters (before I used game_ui + a button for the ultimate fate).

          Note that pickables items can be used by any player at any level.

          I tried to solve the problem by using a filter that prohibits the game to rename the targetname of level1 and 2 players (TestActivator> if targetname = level 1 OR level 2 = do not rename). It works very well, the only problem is that those who have level 1 or 2 can only use characters, not pickable items.

          I'll try to find a solution with the filter_multi as Like a Bauxe said. Maybe i'll just remove the filters of pickable items :/