Results 1 to 19 of 19
  1. #1
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default UDK and SimplePawn, groundspeed has no effect?

    So I started using UDK about 2 years ago now, then changing the pawn speed was simply to set the groundspeed.

    However, now no change is present when I set the groundspeed to something else if I'm extending from either UDKPawn or SimplePawn.
    How do you set their speed now?
    Last edited by Graylord; 04-27-2012 at 08:25 AM.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  2. #2
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,749

    Default

    in default properties then it's
    Code:
    GroundSpeed=number
    but in function i don't know if it works for UDKPawn but for UTPawn i would do it this way it works for me
    Code:
    UTPawn(Owner).GroundSpeed *= number ;
    anyway i don't know if it will work for you but it does for me and i use an old version of UDK so perhaps they changed a little bit i'm not sure anyway
    Last edited by reinrag; 04-26-2012 at 11:38 AM.

  3. #3
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    As I said, groundspeed does absolutely nothing.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  4. #4
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,749

    Default

    That's weird it should work already extended UDK and i could set the groundspeed on the default properties what version of UDK you using ?

  5. #5
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    07 2011, and 09 2011
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  6. #6
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,749

    Default

    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

  7. #7
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    213

    Default

    Are you changing AccelRate as well, or just GroundSpeed?

  8. #8
    MSgt. Shooter Person
    Join Date
    Feb 2012
    Posts
    265

    Default

    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

  9. #9
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,953

    Default

    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
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  10. #10
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,749

    Default

    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,

  11. #11
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    38

    Default

    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.

  12. #12
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Posts
    484

    Default

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

  13. #13
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    GroundSpeed is only set once in my case, and that's in the default properties.
    And my classes are definitely being used.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  14. #14
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Location
    San Francisco
    Posts
    79

    Default

    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?

  15. #15
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    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.
    Last edited by Graylord; 04-27-2012 at 11:23 PM.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  16. #16
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Location
    San Francisco
    Posts
    79

    Default

    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.

  17. #17

    Default

    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.


  18. #18
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,749

    Default

    Quote 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.

  19. #19
    MSgt. Shooter Person
    Join Date
    Aug 2010
    Posts
    196

    Default

    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);
    }


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.