Count infected kills?

Grab your favourite IDE and tinker with the innards of game engines

Count infected kills?

Postby Goonie on Thu Jan 17, 2013 8:09 pm

Is there a way to count how many zombies have been killed(in Left 4 Dead 2) by survivors and after each kill send output to some entity in hammer? What Im trying to do is add value 10 to math_counter for each kill. This can be made with vscripts. Any help will be apriciated.
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby nub on Thu Jan 17, 2013 8:55 pm

I imagine there's some way since it counts how many zombies were killed at the end of each campaign in the credits. No idea if that can be "tapped in to" from Hammer Editor though.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Count infected kills?

Postby Goonie on Thu Jan 17, 2013 10:19 pm

I saw some vscript examples and it looks like it can be done like this:
Find zombies by class/name
After kill zombie by survivors
Send I/O to math_counter
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby nub on Thu Jan 17, 2013 10:57 pm

That sounds about right. My SDK knowledge is extremely rusty though.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Count infected kills?

Postby Goonie on Fri Jan 18, 2013 2:14 am

Can someone help? Maybe some example script about finding zombies?
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Plague on Fri Jan 18, 2013 2:43 am

It's a bit late for me to look closer into this but from what I can find you're probably gonna need to figure out how to target the common infected, this will need to be either a large list of all the models the CI use or if you can find it an ent name or class name to reference.

Once you get this you need to listen for on death events, which I can't even confirm exists in the vscripts implementation.

Once you can both search for all active CI AND capture OnDeath outputs you simply use 'EntFire'(something like that) to trigger probably a relay which adds 10 points to the counter.
You can specify multiple triggers for the relay so you can do bonus points for SI and Boss Infected.

But sadly it's very undocumented and I don't even know if the community knows the full implementation of the vscripts.
Looks like with the L4D2 workshop beta though Valve confirmed a scripting tool is going to begin beta testing.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Count infected kills?

Postby Goonie on Fri Jan 18, 2013 11:46 am

Scripting tool? Wow. Well what Im trying to achiv with the script like that is to make cash system to buy weapons that are placed all of the map.

Theres a script in here:
http://forums.steampowered.com/forums/s ... ?t=1419758
but the link to download is dead
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Goonie on Sun Jan 20, 2013 8:47 pm

I manage so far to do this within Hammer with math_count, filters and trigger multiple. However part of the function is that I have to parent a brush to a specify infected model, but I cant figur it out how to parent this brush that it will be with model not in some distance.
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Plague on Mon Jan 21, 2013 1:00 am

I was actually gonna run some tests with the vscripting system this week, If I come up with anything I'll post back with information and more.

But for now a hammer work around is better than nothing, Not sure I understood that last bit? Might try rephrasing it.

Either way in a couple days I should have something to show.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Count infected kills?

Postby Goonie on Mon Jan 21, 2013 5:05 pm

What I mean is that a brush must be parented to specify model that is set in filters. Brush is parenting good to, example Boomer in game, but the problem is that the brush is away from boomer model. I want that brush to be "teleported" to boomer model so players will be able to shoot it. For now I have only special infected made beacose theres lot of infected models.
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Goonie on Sun Jan 27, 2013 3:16 pm

Any info on that script you are working on?
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Plague on Mon Jan 28, 2013 10:06 pm

Alright then, basically the moment I said that the week turned out to be filled with work and then I was getting some free time this weekend when my father had some issues and is still in the hospital since saturday night.

Needless to say I got a little swamped and haven't got much working.

But some luck to a certain degree, I did see how you can track common infected thanks in large part to the fellow in the SPUF thread detailing info on the Vscript system.
http://forums.steampowered.com/forums/s ... 61&page=16

Which lead me to a nice script here that tracks the global number of infected killed.
http://www.leeland.net/trcoofcozoki.html

This isn't quite what you would need but I have a good idea of where to take it, I'm just not sure how to determine who the killer is.(I think I have an idea)

The current issue I'm having was getting that script to work above, but I think it's just the way I'm attempting to run it.(been awhile since I mapped in l4d2)


Other than that still nothing to report back, When all this personal business gets sorted I'll jump on it hopefully.

P.S.
The idea I'm thinking was running through all the infected similar to the script above and adding an onkill output to each CI. I'm not sure if this has an !activator but if it does you can use that to track the killer.
You'd have each death add to the corresponding counter. You could probably also keep track inside the script for other purposes.
Contact. The EU welcomes the pain free. That's emotional impact.
I actually think limitation is good for creativity. If we had an engine that could do everything, we would be in trouble. It gives us focus. ~~ Randy Lundeen
User avatar
Plague
Veteran
Veteran
 
Joined: Tue Jun 22, 2010 7:12 pm

Re: Count infected kills?

Postby Goonie on Tue Jan 29, 2013 1:13 pm

Thanks and the part with !activator may also be a !player. So maybe an input to add 10 points to math_counter on killed(infected) by !player. Also sory to hear about your father. Hope he will feel better soon.
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Re: Count infected kills?

Postby Goonie on Mon Feb 18, 2013 1:20 am

Any info on that script?
Goonie
Regular
Regular
 
Joined: Thu Aug 19, 2010 7:13 pm

Return to Programming

Who is online

Users browsing this forum: No registered users