Counting Players

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Counting Players

Post by NAKED »

I need some help! I am trying to make my map scalable, meaning if there is only 1 player, he should fight a set number of NPC/monsters, however if there are 4 players ingame then I want to spawn more. You know keep the fight unfair.

I noticed on the item_Ammo_357_Large there is a option for "Min Players Before Spawn" meaning there has to be a set number of players before the ammo spawns...does this work in OC...is there something like that for NPC/Monsters?


NAKED
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Re: Counting Players

Post by skidz »

NAKED wrote:I need some help! I am trying to make my map scalable, meaning if there is only 1 player, he should fight a set number of NPC/monsters, however if there are 4 players ingame then I want to spawn more. You know keep the fight unfair.

I noticed on the item_Ammo_357_Large there is a option for "Min Players Before Spawn" meaning there has to be a set number of players before the ammo spawns...does this work in OC...is there something like that for NPC/Monsters?


NAKED
That feature works yes, but we currently do not have a method of counting player to determine the spawning of npcs. I have an idea of how to set something like this up though.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

fug wants
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

What I'm going to do is make a new logic_branch that will count the players and return true if the player count is greater than the value you set the logic_branch too, and return false if it isn't. That way you can fire that branch before your npc template makers to choose the amount of npcs that fit the player count.
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Post by NAKED »

Please enlighten Me! I was thinking of using the Item_ammo spawning count thingy some how. But tell me what your thinking or email me if it's long..


NAKED
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

It is possible to count all the players on map start and only spawn so many npcs. you would use triggers, math counters, branches and possibly cases. But it wouldnt be dynamic with out mass loads of other ents.
So I'm going to include an entity with 1.3 that will help you. Depending on the amount of players, it will output true or false. You can turn on an npc_template_maker with a true, and another with less npcs on false. Or make it more complicated.
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Post by NAKED »

skidz wrote: But it wouldnt be dynamic with out mass loads of other ents.
So I'm going to include an entity with 1.3 that will help you. Depending on the amount of players, it will output true or false. You can turn on an npc_template_maker with a true, and another with less npcs on false. Or make it more complicated.
So It WILL be Dynamic in 1.3 version?

NAKED
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

It wont be a simple one entity system, but it will be easier to setup template spawns to only spawn a certain amount of npcs depending on how many players there are.
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Post by NAKED »

Ok the next question...If this is to happen in 1.3 .... When is 1.3 to happen? And if the answer is "later", then I can assume that there is nothing right now that would do this.


NAKED
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

At the moment I can only assume its very difficult and therefore limited in hammer.
Even what skidz is talking about is still going to require some entity work on behalf of the mapper. So your right in assuming it's extremely difficult at the moment but hopefully can be made more achievable with the help of our devs for the future!

I believe one of singes maps; coop_epicycle_v3 has a player count system.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

What you could do is force a bunch of players through a trigger that 'ontouch' adds to several math counters. Every math counter would enabled a branch. So one counters max is 1, anothers is 5, and anothers is 10. If for instance only 5 players went through, before the doors opened to the map the 5 man branch would be open and only activate entities for a 5 player game. Its more difficult then that even. The entity I made for 1.3 will help and break down this process so you don't have to use multiple math counters or triggers, you will only need several logic_player_branches instead with the same name. Only one will return true and set off a relay the sets the npc spawners to something for the amount of players. Then if you wanted to make it dynamic, you would have another math counter that would test each logic_player_branch over and over and it would act like a dynamic difficulty system. I don't think we will be investing any more time into this is the near future, because anything is possible with the right knowledge in hammer.
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Post by NAKED »

Sounds reasonable. I will look into a work around on this also...it's not really a show stopper....just one of those things that would make map designing a bit easyer.

Incase anyone cares, I know I do, my map Office Party is coming along nicely and I am looking to get a server 1st of March. I have to go to Germany on business for the month of February, but should be able to continue to work on it with my laptop.

NAKED
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz »

1.3 is very close to release, we are just ironing out some stuff.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

skidz wrote:because anything is possible with the right knowledge in hammer.
Fug logs this statement for future reference. It may come back to haunt you!
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
NAKED
Polygon
Polygon
Posts: 50
Joined: Sun Oct 21, 2007 11:15 pm
Location: Atlanta Ga USA

Post by NAKED »

I figured out a way to trigger the spawning of NPC's based on the number of Players ! 8)


Scalable mapping! :shock:


NAKED
Post Reply