grenade dodge code

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

RoBoT

FNG / Fresh Meat
Mar 21, 2009
1,155
156
0
34
Syria
I wonder where I can find the code that makes zeds dodge the grenades, and how i can disable it for my custom zeds?
 

FluX

Grizzled Veteran
Oct 26, 2010
5,379
234
63
www.fluxiserver.co.uk
I wonder where I can find the code that makes zeds dodge the grenades, and how i can disable it for my custom zeds?
I think this is something that all specimens are using. I personally (without looking) think that there is a file that ALL specimens get affected by. This is where i'd look for that code just because all specimens do that exact same technique on getting away from the grenade. Have a look at the extended files of the specimens (actualy file for them and their base files).
 

Marco

Active member
May 23, 2009
644
227
43
Finland
It is KFMonsterController.FearThisSpot. Simply blank out that function in your own monstercontroller for your custom NPC.
 

RoBoT

FNG / Fresh Meat
Mar 21, 2009
1,155
156
0
34
Syria
so i just make like:
// Overridden because we want our Zeds to be a bit more scared of fear spots
function FearThisSpot(AvoidMarker aSpot)
{
}

can you explain more please? and should i do next?
I assume that if I made custom KFMonsterController.uc then im gonna have to make custom KFMonster.uc then Zombie[name]Base.uc
 

FluX

Grizzled Veteran
Oct 26, 2010
5,379
234
63
www.fluxiserver.co.uk
Right what exactly you doing, just making them not dodge the grenades?
If so, just extend the ZombieBloat.uc and then just add the function:
Code:
// Overridden because we want our Zeds to be a bit more scared of fear spots
function FearThisSpot(AvoidMarker aSpot)
{
}
into that. As all the controllers are linked with the base classes etc, the function is used through them all (like I explained first of all).

The above does the altered Bloat specimen.
 

RoBoT

FNG / Fresh Meat
Mar 21, 2009
1,155
156
0
34
Syria
so basically no need to make custom KFMonsterController.uc thats great! i was worried of this getting more confusing.

Thank you both!
 

FluX

Grizzled Veteran
Oct 26, 2010
5,379
234
63
www.fluxiserver.co.uk
Well actually all you need to do is make a custom specimen class. Just add the function inside of it as all the specimens extend to the controller class.
 

Marco

Active member
May 23, 2009
644
227
43
Finland
Well actually all you need to do is make a custom specimen class. Just add the function inside of it as all the specimens extend to the controller class.

..not. You need to extend the KFMonsterController and put function inside the Controller, not the Pawn.
Then in your custom Pawn put ControllerClass=YourCustomController in the defaultproperties block.
 
  • Like
Reactions: RoBoT and Benjamin

RoBoT

FNG / Fresh Meat
Mar 21, 2009
1,155
156
0
34
Syria
..not. You need to extend the KFMonsterController and put function inside the Controller, not the Pawn.
Then in your custom Pawn put ControllerClass=YourCustomController in the defaultproperties block.

works perfect!

now they just step aside alil cause of nade collsion once i toss it but not trying to dodge it