Tripwire Interactive Forums

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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2011, 12:38 PM
jeremweb's Avatar
jeremweb jeremweb is offline
Member
 
Join Date: Jan 2011
Posts: 31
Default [HELP]Script !

hi,
i would like to detect if a player cause damage at Specimen. I use the NetDamage function :
Code:
function int NetDamage( int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
{

local KFPlayerController player;
player = KFPlayerController(instigatedBy.Controller);
.
.
.
}
My probleme it at this line:

player = KFPlayerController(instigatedBy.Controller);

When I want to test if a specimen have a headShot damage, but my KFplayerController allway equal none ...
Someone can help me?
Thanks!
Reply With Quote
  #2  
Old 04-23-2011, 06:56 PM
Benjamin Benjamin is offline
Senior Member
 
Join Date: May 2009
Location: France
Posts: 3,419
Default

As far as I'm aware the NetDamage function isn't called for specimens (see the ReduceDamage function in KFGameType.uc), so what you want to do won't be possible this way. I may be wrong though, so if anyone could shed some light on this it'd be helpful!
Reply With Quote
  #3  
Old 04-27-2011, 12:43 PM
jeremweb's Avatar
jeremweb jeremweb is offline
Member
 
Join Date: Jan 2011
Posts: 31
Default

That's what it seems to me, because I did a test and when a specimen touch a player , the function work.
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:09 PM.


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