Tripwire Interactive Forums

Go Back   Tripwire Interactive Forums > Killing Floor Forums > Killing Floor Modifications > Coding

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2012, 09:17 AM
Dinamix Dinamix is offline
Senior Member
 
Join Date: Mar 2012
Posts: 142
Default [Req]Getting hp for killing zombies

Hello i know there is Regen hp mut,but i want that for killing clot would get 1hp,killing scrake 4 hp.I could myself put zombies ,but I just need example how to do it .
Reply With Quote
  #2  
Old 06-17-2012, 11:50 AM
Benjamin Benjamin is offline
Senior Member
 
Join Date: May 2009
Location: France
Posts: 3,419
Default

Add your own GameRules class and implement the ScoreKill function, then inside that function you'll give the Killer's pawn health depending on who the Killed's pawn is.
Reply With Quote
  #3  
Old 06-18-2012, 12:16 AM
scary ghost's Avatar
scary ghost scary ghost is offline
Senior Member
 
Join Date: Sep 2010
Location: California
Posts: 779
Default

Unfortunately that doesn't work for KFGameType, or I believe any game that deriving from Invasion. KFGameType.ReduceDamage only calls NetDamage for friendly fire, not for damage done to the other "team".
Reply With Quote
  #4  
Old 06-18-2012, 12:59 AM
ro_sauce ro_sauce is offline
Senior Member
 
Join Date: Sep 2007
Posts: 3,110
Default

howabout sticking something into instigator.takedamage?
__________________


For RO2 Crash Support Help, PM me your problem and teamview connection, and I will see if I can fix it for you.
Reply With Quote
  #5  
Old 06-18-2012, 08:43 AM
Benjamin Benjamin is offline
Senior Member
 
Join Date: May 2009
Location: France
Posts: 3,419
Default

Quote:
Originally Posted by scary ghost View Post
Unfortunately that doesn't work for KFGameType, or I believe any game that deriving from Invasion. KFGameType.ReduceDamage only calls NetDamage for friendly fire, not for damage done to the other "team".
You don't need to use NetDamage, you can use ScoreKill as I suggested. I haven't tested it myself but judging from what I see in the source files it should work just fine.
Reply With Quote
  #6  
Old 06-18-2012, 04:14 PM
scary ghost's Avatar
scary ghost scary ghost is offline
Senior Member
 
Join Date: Sep 2010
Location: California
Posts: 779
Default

Quote:
Originally Posted by Benjamin View Post
You don't need to use NetDamage, you can use ScoreKill as I suggested. I haven't tested it myself but judging from what I see in the source files it should work just fine.
Oh, never mind, did not read carefully. I thought he was talking about the vampire mutator that did hp regen based on damage done.
Reply With Quote
  #7  
Old 06-18-2012, 07:18 PM
tehmadcap tehmadcap is offline
Senior Member
 
Join Date: Nov 2010
Posts: 369
Default

You should have a look at the source of Marco's kill messages mutator
Reply With Quote
  #8  
Old 06-19-2012, 08:08 AM
Dinamix Dinamix is offline
Senior Member
 
Join Date: Mar 2012
Posts: 142
Default

Thnak you for helping ,work everything good!And also is it possible (maybe how) to make like a requirment example : kill 500 bloats or more to let regen hp.I am using serverperks and i tried to do MystatObject.Bloatkills (or simmiral ,don't remember) ,but it doesn't work (didn't compile).
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2005 - 2013, Tripwire Interactive, LLC