• 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/

Modding Character Movement Value

KrispyTpose

FNG / Fresh Meat
Apr 19, 2018
2
0
33
I'm working on modding character movement for a gamemode I had in mind, and I'm new to coding in Unreal Script and the in's and out's of KF2 engine.
Which class Scripts am I looking to work on to accomplish this? I've used tripwireinteractive.atlassian to practice making a functioning script, but could still use pointers.
Am I working with KFGameInfo and KFPlayerController found in SRC\KFGame\Classes\ ?
 
If you are referring to player movement speed, the relevant variables are Pawn.GroundSpeed and KFPawn.SprintSpeed. GroundSpeed is walking speed, and SprintSpeed is sprinting speed. To modify player movement speed, you should create a custom class that extends KFPawn_Human and change GroundSpeed and SprintSpeed in the defaultproperties section, and then set DefaultPawnClass to your custom player class in your GameInfo's defaultproperties section. If you try to modify the movement speed from an external class instead of creating a custom player class, you will run into issues with the speed being reset to the standard values due to KFPawn_Human.UpdateGroundSpeed.

If you are creating a custom gamemode, you will probably want to extend KFGameInfo_Survival, assuming it is wave-based.
 
  • Like
Reactions: KrispyTpose
Upvote 0