Scoring System Help!

Discussion in 'Mapping Questions & Discussion' started by Sarah, Nov 2, 2009.

  1. Sarah

    Sarah L1: Registered

    Messages:
    42
    Positive Ratings:
    0
    I made a little pyro map a while ago which people have started to play again. I know it's not conventional and a total gimmick but it's a good laugh once in a while!

    People have asked if I can implement a scoring system somehow, or force a certain number of pyro's to be allowed on the 'pitch' at one time.

    I don't have the knowledge or skills to even know where to begin with something like this so just wondering if anyone has any ideas? Is it even possible?

    Thanks :)

    p.s My replies might be a little slow, I still have terribly slow loading times to this site!
     
    Last edited: Nov 2, 2009
  2. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Limiting Pyros: No, not really. That'd be a server plugin of some sort.

    Scoring system: Possible, there are math counters and you can use them to [ame=http://forums.tf2maps.net/showthread.php?t=10186]cause certain effects in the game world[/ame].
     
    • Thanks Thanks x 1
  3. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    If you tell me how many people per team our allowed to be on the field I can send you a decent prefab. Better yet if you can tell me that and send me the map I could do it for you, unless you wanted to do it.



    Counting Players:
    Step 1:

    Download this prefab: http://www.fpsbanana.com/prefabs/3341

    This will count the number of players within the trigger zone.

    Step 2:

    Cover the entire field with it, copy it and place it in the same place. Add team_filters to both, one for BLU and one for RED.


    Step 3:

    For each Math_Counter provided in the prefab change it's max value [the max number of players per team] then go to it's outputs. Select OnHitMax->[name of the trigger which opens the teams spawn door]->disable

    There you're done.

    You'd need to add an additional output to re-enable the trigger when someone dies/leaves. Still working on the scoring system atm.


    Side Note:

    I would also add class filters to your spawn doors so that only Pyros can be let out on the field.

    If you still can't do it I'll try it myself and get back to you.

    Edit:

    I've downloaded the prefab it seems trivial, this should be very easy to accomplish.

    If Game_Score works in TF2 then adding a scoring system is also trivial.
     
    • Thanks Thanks x 1
    Last edited: Nov 2, 2009
  4. Sarah

    Sarah L1: Registered

    Messages:
    42
    Positive Ratings:
    0
    Wow thanks for the input! I've uploaded the map to ftp :

    http://www.purple-fire.co.uk/mapping/pyromap.zip

    I guess four pyro's would be a good average. When there is more then 4 on either side it gets a bit crazy.

    It was only ever supposed to be a little map for my server so it's not very polished yet. If we get can a scoring system in and some sort of ending to each round, it could be released.

    At the moment it just ends, no team X won or anything.

    Oh also when I first did this I was under the impression you couldn't limit classes to one area? I guess there was an update I missed :)


    p.s The map name is/was an inside joke, I'll come up with something else if I release it lol :)
     
  5. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    Alright coolio, I like working with entities so this will be fun for me and useful for you.

    Theres always been class limiting filters and team limiting filters people just don't seem to use them much [It's how they keep red out of blu base and vice versa].
     
  6. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Impossible. The class filter filters on programming objects' class, not TF2 classes. You can perhaps distinguish a player from a rocket, but not a Soldier from an Engineer. All players are of the same class "CTFPlayer". (Does not stand for Capture The Flag.)

    Like I said before, that kind of change is the realm of server plugins, not map logic.
     
    Last edited: Nov 4, 2009
  7. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    Hey terr do you know if you can directly reference a rocket in TF2?

    for this particular map you score when the rocket enters the other teams side. So would have put a brush - on damaged - add score

    is it possible to set up a filter so that it can only be damaged by tf_projectile_rocket

    Was also going to spawn a bot which will fire a rocket for you.

    Even just adding a filter so that the pyro's shotgun won't have an effect.
     
    Last edited: Nov 5, 2009
  8. Sarah

    Sarah L1: Registered

    Messages:
    42
    Positive Ratings:
    0
    Yeah that's what I thought regarding limits on specific classes.

    As for spawning a bot I don't know how effective that will be. I did consider it at first, but in the end a human player with more control over the rate of fire and the position just makes more sense. The most important thing I want to add to the map is a scoring system. It's fun but it'd be more fun if your team could actually win!

    I'll have some time this weekend to look over the prefabs and the counter. So I'll let you know if I get anywhere with it.

    Thanks again :)
     
  9. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    Yea I was going to add it as optional - Say you only had 4 people then you could still play 2 v 2 - but human player would always be better for when you get more people.

    I've finished the limiting thing now - found an awesome output on the trigger_multiple "OnNotTouching" which means it wont break if people leave while on the field. Unfortunetly to decompile your .bsp without corruption I had to remove props and displacements so it's a bit bare - You could probably cut n paste my stuff into the completed map though.

    I am pretty sure there are certain damage filters [I know there is in CS] so the scoring system should work out.
     
  10. Sarah

    Sarah L1: Registered

    Messages:
    42
    Positive Ratings:
    0
    Sadly I have formatted since I made this map but I decompiled it myself with no problems, only thing missing is a custom rock wall texture on the displacements. I didn't get very far with this over the weekend, entities just aren't my strong point :(