Announcement

Collapse
No announcement yet.

UDK and SimplePawn, groundspeed has no effect?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I'm a few months late to this party, but I had the same problem.

    It seems the culprit is actually GameInfo.SetDefaults() for me.
    It gets called AFTER the pawn's PostBeginPlay(). This is why your settings in the Pawn's default properties get overwritten.

    Code:
    /* SetPlayerDefaults()
     first make sure pawn properties are back to default, then give mutators an opportunity
     to modify them
    */
    function SetPlayerDefaults(Pawn PlayerPawn)
    {
    	PlayerPawn.AirControl = PlayerPawn.Default.AirControl;
    	PlayerPawn.GroundSpeed = PlayerPawn.Default.GroundSpeed;
    	PlayerPawn.WaterSpeed = PlayerPawn.Default.WaterSpeed;
    	PlayerPawn.AirSpeed = PlayerPawn.Default.AirSpeed;
    	PlayerPawn.Acceleration = PlayerPawn.Default.Acceleration;
    	PlayerPawn.AccelRate = PlayerPawn.Default.AccelRate;
    	PlayerPawn.JumpZ = PlayerPawn.Default.JumpZ;
    	if ( BaseMutator != None )
    		BaseMutator.ModifyPlayer(PlayerPawn);
    	PlayerPawn.PhysicsVolume.ModifyPlayer(PlayerPawn);
    }

    Leave a comment:


  • replied
    Originally posted by FireclawStudios View Post
    SOLUTION:

    but this could help others I hope.
    Of course it can
    I noticed that weeks ago while I was trying to help someone out, but instead of changing the line I just recreated TickSpecial on the new class without calling it's super function, that avoids changing on SimplePawn itself.

    Leave a comment:


  • replied
    SOLUTION:

    Ok I had the same issue with SimplePawn variables but after a few hours of poking around I've fixed it!! (Graylord may have resolved his issue months ago but this could help others I hope).

    Ok so what you do is open up SimplePawn.uc and you need to change 2 things - GroundSpeed (under the list of other variables) and also the line which says "GroundSpeed = CastlePawnSpeed". I changed it to "GroundSpeed = 150" but I'm guessing you could just delete it.

    Leave a comment:


  • replied
    You might try setting groundspeed for each parent pawn class using the console; it almost sounds like your pawn class isn't being used(but that would be silly).

    Unfortunately this is such an odd issue that I really don't know what could be going on. Could always try porting your code to another build of UDK; that solved an issue I had where exec functions weren't being compiled.

    Leave a comment:


  • replied
    It does not.

    Compiling is not the issue, as other changes in the same classes are working properly.

    A colleague of mine who is using pretty much a fresh install (really just some levels and models added) of UDK 09, 2011 and is having the exact same issue.

    Leave a comment:


  • replied
    Have you tried doing a full recompile of the scripts using the front end, "UnrealFrontend.exe"?
    A couple months ago an install of UDK was giving me similar trouble, and using the front end to force rebuild all scripts worked.

    It's still a very odd issue you've been having. Does setting GroundSpeed using the console do anything for you?

    Leave a comment:


  • replied
    GroundSpeed is only set once in my case, and that's in the default properties.
    And my classes are definitely being used.

    Leave a comment:


  • replied
    Graylord
    Search trough your code: maybe somewhere in Tick etc. GroundSpeed is changed. For example, in function with out parameter...

    Leave a comment:


  • replied
    I used to have this problem too, but it disappeared after I created a collision cylinder, not sure if its related but thats what I did. Or it could be that I forgot to define the Pawn class in my GameInfo or something.

    Anyway, it works for me, I didn't even defined ground speed in default properties, I just have a sprint function that makes it groundspeed *= 3 when sprint button is held. It works on 2011-12, 2012-02 and 2012-03.

    Here's the all code I have related to groundspeed

    Code:
    exec function runToggle()
    {
    	bRunToggle = !bRunToggle;
    
    	if (bRunToggle)
    	{
    		Pawn.GroundSpeed *= 3;
    	}
    	else if (!bRunToggle)
    	{
    		Pawn.GroundSpeed /= 3;
    	}
    }
    
    exec function sprint()
    {
    	Pawn.GroundSpeed *= 3;
    }
    
    exec function stopSprint()
    {
    	Pawn.GroundSpeed /= 3;
    }
    This is inside my player controller and it works just fine.

    Leave a comment:


  • replied
    Tested it right now ... Didn't know you are right i extend UDK and in my pawn i wrote Groundspeed=500 then i wrote Groundspeed=+500 still didn't do any effect even if i wrote GroundSpeed=000.000020 or GroundSpeed =+000.000020 it would do no effect, is GroundSpeed broken in UDK, ? in UT it works i tried it a few months ago and it worked with the same version than i have 01-2012, weird thing to do be honest,

    Leave a comment:


  • replied
    Are you sure your classes are being used? Groundspeed is technically the -maximum- speed that you can move at in phys_walking, but the default code also allows you to quite quickly get up to groundspeed

    -- Sent from my TouchPad using Communities

    Leave a comment:


  • replied
    I seem to be having the same problem as well! I extend from GamePawn though, and I see a GroundSpeed variable being declared all the way up in the Pawn class. I have no idea why it wouldn't be working

    Leave a comment:


  • replied
    Are you changing AccelRate as well, or just GroundSpeed?

    Leave a comment:


  • replied
    Alright can't test on this pc right now as i use 2011-05; i've got the 2012-01 on my other pc (which is far away) i ain't home, so tonight i'll test it and bump on here if it works or not
    in the meantime someone that tests it before me will hopefully post here

    Leave a comment:


  • replied
    07 2011, and 09 2011

    Leave a comment:

Working...
X