Tripwire Interactive Forums

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-10-2012, 03:20 AM
Vallo Vallo is offline
Junior Member
 
Join Date: Jul 2012
Posts: 6
Default [Help] First Mutator

Hey guys,

I thought I'd try to write my first mutator today and start simple but I am lost. It compiles but does nothing in game. From searching the forums it looks like I'm meant to to use ModifyVelocity in some form but I have no idea how.

In the end I'm hoping to make it a sprint function but right now I'm just trying to change the player speed overall for the whole match. Anyway, here is the bit of code I tried:

Code:
class SprintMutator extends Mutator;

function PostBeginPlay()
{
    local KFHumanPawn Player;
    
    foreach DynamicActors(class 'KFHumanPawn', Player)
    {
        Player.GroundSpeed = 2000.0; //high to make sure I just wasn't noticing the increase
    }
}


defaultproperties
{
    GroupName="KFSprintMutator"
    FriendlyName="Allow Sprint"
    Description="More Speed"
}
Thanks for any help you can give me
Reply With Quote
 

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 01:35 AM.


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