How should I go about removing sprint from Marines.

IronsoulIronsoul Join Date: 2011-03-12 Member: 86048Members
Hello, another question about modding NS2; I promise I'll help other noobs out once I'm good at this :).

Ok, so I'm trying to remove sprint functionality from the Marine, what's the sort of thing I should go about doing? I've taken a look at the source code and there's a lot of different things about sprint.

Do I only need to do this in the server lua code? Which files should I modify, where in those files should I modify stuff?

I guess the core of the question is, how does the Sprint for marine code work, if I understood how that worked, I'd probably be able to figure out the rest.

Thanks for any and all assistance, much appreciated.

Comments

  • TharosTharos Join Date: 2012-12-18 Member: 175439Members
    In marine.lua

    " self:UpdateSprintingState(input)"
    and
    " modelMixin:SetAnimationInput("move", "sprint")"

    I've not tested but these 2 lines should help (try to comment them to see what happens)
  • IronsoulIronsoul Join Date: 2011-03-12 Member: 86048Members
    commenting out the first part seems to have done the trick. Although I'd rather use what people refer to as hooking in to do the job. Is there any way I can hook in to change this behaviour without modifying a copy of Marine.lua ?
  • TharosTharos Join Date: 2012-12-18 Member: 175439Members
    I guess you can Hook into the sprinting function in SprintMixin.lua

    Maybe hook into : function SprintMixin:UpdateSprintingState(input) and return someting like : self.sprintMode = false

    I'm not very comfortable with lua coding, so I may be totaly wrong but anyway you should be able to find something usefull in SprintMixin.lua ^^
Sign In or Register to comment.