npc_template trigger when all died

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
User avatar
Jack5500
Polygon
Polygon
Posts: 27
Joined: Tue Apr 06, 2010 1:12 am
Location: Germany

npc_template trigger when all died

Post by Jack5500 »

Dear Dommunity,
I'm creating a map for OC right now and I ahve a problem.The map is a survival map and the next wave should be triggered when the previous wave is dead.How can I do that?
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Post by Gary »

Could have a huge trigger that detects any NPCs that would of been in the wave and fire an output when it doesn't detect them anymore.
User avatar
Jack5500
Polygon
Polygon
Posts: 27
Joined: Tue Apr 06, 2010 1:12 am
Location: Germany

Post by Jack5500 »

uhmmm...how to do that?
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Post by Gary »

Never mind, I just noticed NPC's have a OnDeath output. Use that to add 1 to a counter, have the counter's max the amount of NPCs are in the wave, when they are all dead the counter's OnMax output should fire, indicated the wave has been killed.

http://developer.valvesoftware.com/wiki/Math_counter
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Post by Gary »

Edited the post.
Beanbrains
prop_static
prop_static
Posts: 67
Joined: Mon Mar 08, 2010 7:52 pm

Post by Beanbrains »

If you are using a npc_template_maker you could just create an OnAllSpawnedDead output on it.
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Post by Shana »

Jack5500 wrote:uhmmm...how to do that?
Do you even know the basics of mapping and the I/O system?
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

http://developer.valvesoftware.com/wiki ... late_maker

hf with the outputs...

@ Gary, before trying to help someone look if you can get proper informations first, it's not like that i needed more the 1 min to find that...
Image
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Post by Gary »

I didn't even think it had such an output.

By the way even though a lot of stuff I make is done improperly, it all works.


Also, if you need help with the input/out system:
http://developer.valvesoftware.com/wiki ... nd_Outputs
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

it's not about thinking if it could have it, you can never know... that's why such sites exist, look at what you want to do, get informations wich entitys could satisfy that and see what it has included, that's the usual way to make a proper done map

unless you already know that kind of stuff of course (time saver)
Image
User avatar
Jack5500
Polygon
Polygon
Posts: 27
Joined: Tue Apr 06, 2010 1:12 am
Location: Germany

Post by Jack5500 »

Okay, I did the way with the math_counter: I created a trigger which enables the Npc_maker and a Squad thats adds one to the counter at death, which is the counters maximum, which triggers wave 2, via I/O
...so how can I solve this?
Didn't get it?Need mroe details?Here is the vmf:
http://rapidshare.com/files/373605363/o ... rvival.vmf
Regards & gn8, Jack
Beanbrains
prop_static
prop_static
Posts: 67
Joined: Mon Mar 08, 2010 7:52 pm

Post by Beanbrains »

Why does the trigger_once at the spawn point start the countdown for both waves?

Also you need to set the counters maximum value to the number of npcs that are going to spawn. Alternatively you could just use OnAllSpawnedDead on the npc maker instead of using the counter.

Another thing, use info_player_deathmath instead of info_player_start.
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Post by Gary »

Jack, I wouldn't recommend using my method. Mine would work, but theres no reason to go through the trouble when there is something much more simple(OnAllSpawnedDead output).

I need to stop basing everything I do on assumptions... maybe I could read the entire VDC...
User avatar
Jack5500
Polygon
Polygon
Posts: 27
Joined: Tue Apr 06, 2010 1:12 am
Location: Germany

Post by Jack5500 »

Okay , thank you guys, of course it worked with the OnAllSpawnedDead Output and to answer your question lately: Yes I do know the I/O System
Post Reply