|
Post by therealguymins on Aug 23, 2010 20:56:30 GMT
I want to make a map on a fast train thing that goes thrpugh space while the player tries to kill as many npcs as possible. When The train goes through a trigger at the end, I want the number of kills to appear on the screen. Thanks! Oh, I haven't been here for a while because my internet died this month.
|
|
|
Post by Zeph on Aug 23, 2010 22:17:24 GMT
Welcome back.
NPC kill counter ... Hmm...
Your counter is "Math_Counter". You can "add 1" on NPC death.
i assume you spawn NPCs using a template, but if not you'd have to do this for all NPCs. Add the output: OnDeath -> "NameOfMathCounter" -> Add -> "1"
|
|
|
Post by therealguymins on Aug 24, 2010 2:05:43 GMT
Welcome back. NPC kill counter ... Hmm... Your counter is "Math_Counter". You can "add 1" on NPC death. i assume you spawn NPCs using a template, but if not you'd have to do this for all NPCs. Add the output: OnDeath -> "NameOfMathCounter" -> Add -> "1" I made a bunch of fast headcrabs and made them add to the counter. Right now I'm trying to make it appear on the screen with triggers and stuff. I just read that all math_counters do is store integers. I could make a small area of the map at the end that for every npc killed a sodacan spawns from a template and you can just count those. And a related quick question, Is there a way yo restart the map with a button and spawn the npcs again, but it doesn't have two npcs where you missed a kill?
|
|
|
Post by Zeph on Aug 24, 2010 10:08:16 GMT
Text on screen is a problem with CSS. Perhaps "game_text" is now added since CSS now uses the 2009 engine? We can only hope.
math_counters can do a lot more. it can manipulate the integer it stores. EG x2, /8, +6 and -2, etc.
You can add an output to math_counter "OutValue" -> "NameOfTemplate" -> Spawn. Usually this outputs the integer held, but you could use it just as a trigger too. Every time it updates (a new value given, ie a zombie just died) it'll trigger the spawn.
If the zombies dont move, then yes, have a trigger check if the space is filled, if not spawn a zombie. if they move... tricky.
|
|
|
Post by therealguymins on Aug 24, 2010 19:44:03 GMT
Yeah, I'm doing the can thing now, I read on the VALVe Wiki that math_counters can't actually do anything with text. Thanks! I don't want to make another thread, but, Can I use the tv prop from HL2 without it being a prop_physics?
|
|
|
Post by therealguymins on Aug 24, 2010 19:55:32 GMT
Nevermind the tv, I made a plasma screen instead. And this is a HL2 map.
|
|
|
Post by Zeph on Aug 24, 2010 22:58:27 GMT
prop_physics disabled motion and only break on trigger.
|
|
|
Post by therealguymins on Aug 25, 2010 15:30:14 GMT
Oh, ok, I thought I had to use a phys_constraint, which I just recently figured out that it's how Valve sticks bodies on spikes in ravenholm.
|
|
|
Post by Zeph on Aug 25, 2010 23:33:59 GMT
That's for Ragdolls, mostly.
|
|