#1  
Old 02-03-2009, 07:50 AM
bobop Offline
Zombie
 
Join Date: Mar 2007
Posts: 319
Default Playercounter

I am not having any trouble with anything this is just to help people with creating a counter for players which can be filtered as well.

You need these entities and this amount
1 game_zone
1 trigger_multiple
1 math_count
1 other entitie

First you need to make a brush with the texture trigger
2nd you need to make the brush into a entitie (ctrl + t) called game_zone (name it as well) (or something like that)
3rd make a trigger brush entitie called trigger_multiple
4th make a output to the game_zone from the trigger_multiple (onstarttouch)
5th Make a math_counter for the player amount you want if you want it to count more then one count for players make another math_count
6th make a output from the game_zone to the math_count (playercounted (or something like that))
7th make a output from the math_count to the finnal thing you want done.


Here is the example: http://files.filefront.com/filter+pl.../fileinfo.html

Last edited by bobop : 02-03-2009 at 11:49 AM.
Reply With Quote
  #2  
Old 02-03-2009, 08:40 AM
Jonny's Avatar
Jonny Offline
Developer
 
Join Date: Nov 2008
Posts: 522
Default

OK, and how do you differ humans & zombies?
Reply With Quote
  #3  
Old 02-03-2009, 08:59 AM
bobop Offline
Zombie
 
Join Date: Mar 2007
Posts: 319
Default

Quote:
Originally Posted by Jonny View Post
OK, and how do you differ humans & zombies?
with team filter you want the trigger_multiple to have the filter because thats what counts the players.
Reply With Quote
  #4  
Old 02-03-2009, 09:55 AM
Jonny's Avatar
Jonny Offline
Developer
 
Join Date: Nov 2008
Posts: 522
Default

Something is wrong in your script construction. There is no "game_zone" entity in HL2. I think you mean the "game_zone_player".

And as it is at the moment, you can't filter out the zombie player. Because if a zombie player is inside the game_zone_player brush and a human player is "OnStartTouch" the trigger_multiple, the game_zone_player entity will count "2 player" inside his brush.
Reply With Quote
  #5  
Old 02-03-2009, 11:31 AM
bobop Offline
Zombie
 
Join Date: Mar 2007
Posts: 319
Default

Quote:
Originally Posted by Jonny View Post
Something is wrong in your script construction. There is no "game_zone" entity in HL2. I think you mean the "game_zone_player".

And as it is at the moment, you can't filter out the zombie player. Because if a zombie player is inside the game_zone_player brush and a human player is "OnStartTouch" the trigger_multiple, the game_zone_player entity will count "2 player" inside his brush.
I said something like that and you can filter zombies out. You do not have anyone inside the the game_zone_player you want it where players can not get to because thats what the trigger_multiple is for if you have it count players in side the game_zone_player.

I am making a example now it will be done in like a few min.
Reply With Quote
  #6  
Old 02-03-2009, 12:21 PM
Jonny's Avatar
Jonny Offline
Developer
 
Join Date: Nov 2008
Posts: 522
Default

Hmmm ... I'm totaly confused.

When no one can stand inside the "game_zone_player", for what do you need that entity? In this case the trigger_mutiple should directly add his information to the math_counter. The result should be the same.
Reply With Quote
  #7  
Old 02-03-2009, 12:31 PM
bobop Offline
Zombie
 
Join Date: Mar 2007
Posts: 319
Default

Quote:
Originally Posted by Jonny View Post
Hmmm ... I'm totaly confused.

When no one can stand inside the "game_zone_player", for what do you need that entity? In this case the trigger_mutiple should directly add his information to the math_counter. The result should be the same.
Eh I guess u do not need it but you can use it I use it. I think it adds a better result though not sure but yeah.
Reply With Quote
  #8  
Old 02-03-2009, 12:55 PM
Jonny's Avatar
Jonny Offline
Developer
 
Join Date: Nov 2008
Posts: 522
Default

Narrrffff ... can't download the file. Evil filefront.com and my browser don't harmonize.

But the point of all my posts is: I think, that this kind of counter will not work exactly. When several player run around and touch, do not touch and touch again, the counter will output incorrect results. (Thats my experience.)
Reply With Quote
  #9  
Old 02-03-2009, 01:05 PM
Wazanator's Avatar
Wazanator Offline
Developer
 
Join Date: Nov 2008
Location: In your house
Posts: 4,713
Default

Thanks bobop been trying to figure this out
__________________

Map tutorials
I walk into a bar and say "Hey baby, i make levels on hammer" and i never go home alone
-Earkham
Reply With Quote
  #10  
Old 02-03-2009, 01:13 PM
zerotonothing's Avatar
zerotonothing Offline
Privileged Member
 
Join Date: Sep 2006
Location: New Zealand
Posts: 694
Default

Mine is less complicated, but doesn't give as many features. Although it does achieve outputs based on how many player have spawned, which is all I really want for gun spawning system.

My way is having trigger_onces's under each human spawn which add 1 point to a counter so:

OnTrigger > Counter > Add > 1

Then say I wanted to do something special once there are 10 players (delete or spawn guns maybe?). Have the "Maximum Legal Value" on the counter set to 10 and:

OnHitMax > Gun_teleportor > Teleport

This is all off the top of my head, but shouldn’t that make half a gun spawning system which can’t be screwed with by re-touching the triggers (as they are all trigger_onces)??

If you wanted to delete maybe some powerful guns once there are over 20 players, add another counter WITH the same name and set it's "Maximum Legal Value" to 20 and:

OnHitMax > PowerfulGuns > Kill

edit:

I just realized that for every spawn point which does not spawn a human, will leave its trigger_once still active for a player to accidentally stumble into. For this, make a timer which kills every trigger_once after say 30 seconds...
__________________

Last edited by zerotonothing : 02-03-2009 at 02:30 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -8. The time now is 03:50 AM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Style by © Mathew Summerfield
All Zombie Panic related images and material © Monochrome