Counting Players
Counting Players
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
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
Re: Counting Players
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.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
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
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
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.
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.
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?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.
NAKED
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.
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
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
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.
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
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
Fug logs this statement for future reference. It may come back to haunt you!skidz wrote:because anything is possible with the right knowledge in hammer.
'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
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database