Raised This Month: $ Target: $400
 0% 

[L4D] Code-Kill a Zombie Entity without losing the ragdoll?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-13-2009 , 13:21   [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #1

Heya,

i've run in a little problem on my latest project. The functionality is just like i wanted all right, but i have a little problem when i kill Common Infected by Code.

I know of these 2 ways:

PHP Code:
AcceptEntityInput(zombieid"Kill");
SetEntProp(zombieidProp_Data"m_iHealth"0); 
But both seem to REMOVE the Zombie Entity without spawning the usual ragdoll corpse. Do you know a way around this?
AtomicStryker is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 09-13-2009 , 13:33   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #2

have you tried faking a damage event instead?
__________________
Peoples Army is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-13-2009 , 13:57   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #3

Did you mean it like this? Because that doesnt seem to deal damage to them.

PHP Code:
        new Handle:FakeHurt CreateEvent("infected_hurt");
        
SetEventInt(FakeHurt"amount"zombiehealthmax);
        
FireEvent(FakeHurt); 
AtomicStryker is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 09-13-2009 , 14:09   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #4

Are you trying to take them out of the world or is there actually going to be something or someone killing them?
__________________
Peoples Army is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-13-2009 , 15:25   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #5

Can't you use a point hurt to give them generic damage?
Dragonshadow is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-13-2009 , 16:15   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #6

I want them to die, like if they were gunned down by a player.

I wasnt sure if point_hurt even works on entities ... gonna try it.

EDIT:

It does affect the targeted Zombies, but unfortunately also removed Ragdolls ... well, maybe its not related to this at all and the Ragdolls disappear because of the special situation in which i slay them

Last edited by AtomicStryker; 09-13-2009 at 16:29.
AtomicStryker is offline
TESLA-X4
Senior Member
Join Date: Dec 2008
Location: $Recycle.Bin
Old 09-13-2009 , 21:30   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #7

I think this might work:
Code:
SetVariantString("0");
AcceptEntityInput(zombieid, "sethealth");
But chances are that Valve has taken steps to reduce ragdoll load by making them mostly client-side (un-synchronized locations across clients, kinda like a physics temp ent), and forcing removal after a certain amount of time/number of ragdolls.

Firing the 'Kill' input is analogous to using the delete key on selected text - it is removed instantly, not 'killed' (as I'm sure you've found out too ;) ).

Last edited by TESLA-X4; 09-13-2009 at 21:32.
TESLA-X4 is offline
olj
Veteran Member
Join Date: Jun 2009
Old 09-14-2009 , 05:10   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #8

Lools like we will get a new plugin from you soon
__________________
olj is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-14-2009 , 06:09   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #9

Quote:
Originally Posted by TESLA-X4 View Post
I think this might work:
Code:
SetVariantString("0");
AcceptEntityInput(zombieid, "sethealth");
But chances are that Valve has taken steps to reduce ragdoll load by making them mostly client-side (un-synchronized locations across clients, kinda like a physics temp ent), and forcing removal after a certain amount of time/number of ragdolls.
This doesnt kill them, no. And i'm most certainly not above the ragdoll limit - if i shoot said zombie instead of code killing him he spawns a corpse.



I've also noticed i forgot to add the zombie entity id into my fake event above, so i tried that too ... no success.

Last edited by AtomicStryker; 09-14-2009 at 06:22.
AtomicStryker is offline
Damizean
SourceMod Donor
Join Date: Mar 2009
Old 09-14-2009 , 07:54   Re: [L4D] Code-Kill a Zombie Entity without losing the ragdoll?
Reply With Quote #10

PHP Code:
AcceptEntityInput(iVictim"BecomeRagdoll"); 
Works perfectly, just tested it out.
__________________
Dat annoying guy

Last edited by Damizean; 09-14-2009 at 07:58.
Damizean is offline
Send a message via AIM to Damizean Send a message via MSN to Damizean
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode