Results 1 to 5 of 5

Hybrid View

  1. #1

    Default Walljump Sidescroller

    Hi I have been searching around the forums and the web and found some walljump scripts and found myself finding a few errors if anyone could help me I would appreciate it.
    C:\UDK\UDK-2012-05\Development\Src\Zero\Classes\ZeroPawn.uc(91) : Error, Bad or missing expression in Call to 'FaceRotation', parameter 2
    C:\UDK\UDK-2012-05\Development\Src\Zero\Classes\UDNPlayerControlle r.uc(60) : Error, Bad or missing expression in parenthesis
    checkjump function in my playercontroller
    Code:
    function CheckJumpOrDuck()
    {
        if ( Pawn == None )
        {
            return;
        }
        if ( bDoubleJump && (bUpdating || ((EXILAcrobaticPawn(Pawn) != None) && UTPawn(Pawn).CanDoubleJump())) )
        {
            //UTPawn(Pawn).DoDoubleJump( bUpdating );
            if (maxJumpCount <= maxJumpLimitCurrent /*&& pIsInJumpVolume*/)
            {
                EXILAcrobaticPawn(Pawn).DoWallJump( bUpdating );
                maxJumpCount++;
            }
        }
        else if ( bPressedJump )
        {
            if (Pawn.Physics == PHYS_Falling)
            {
                if (maxJumpCount <= maxJumpLimitCurrent /*&& pIsInJumpVolume*/)
                {
                    EXILAcrobaticPawn(Pawn).DoWallJump( bUpdating );
                    maxJumpCount++;
                }
            }
            else
            {
                maxJumpCount = 0;
                EXILAcrobaticPawn(Pawn).AirControlReset();
                Pawn.DoJump( bUpdating );
            }
        }
        if ( Pawn.Physics != PHYS_Falling && Pawn.bCanCrouch )
        {
            // crouch if pressing duck
            Pawn.ShouldCrouch(bDuck != 0);
        }
    }
    walljump code in my pawn

    Code:
    function bool DoWallJump( bool bUpdating )
    {
        local Vector HitLocation, HitNormal, End, Start;
        local Actor HitActor;
     
        //Perform trace
        Start = Location + (Vector(Rotation) * GetCollisionRadius()/2);
        End = Start + (vector(Rotation) * GetCollisionRadius() * 2.5);
        HitActor = Trace(HitLocation, HitNormal, End, Start, true,);
        `Log("Player try to jump on " @ HitActor);
     
        //check on what we want to jump, we jump only on world surfaces
        if (HitActor == WorldInfo || HitActor.isA('StaticMeshActor'))
        {
            `Log("-Player jump on the wall !");
     
            self.FaceRotation(rotator(HitNormal), GlobalDeltatime);
            Controller.SetRotation( rotator(HitNormal) );
     
            if( HitNormal.Y != 0)
                HitNormal.Y *= WallJumpBoostXY;
            else if(HitNormal.X != 0)
                HitNormal.X *= WallJumpBoostXY;
     
            Velocity = HitNormal;
     
            //PlayerController(Controller).PlaySound(playerSoundWallJump, false, true);
     
            Velocity.Z = JumpZ + WallJumpBoostZ;
     
            return true;
        }
     
        return false;
    }
    credit for these codes belong to http://www.froyok.fr/blog/2011-06-code-exil-wall-jump
    Last edited by oblivion254; 05-28-2012 at 03:44 AM.

  2. #2
    Iron Guard
    Join Date
    Nov 2007
    Location
    USA
    Posts
    660

    Default

    PLease put your code in blocks. Click GO Advanced to get those options.

    Your errors have line numbers, but you aren't showing the line numbers along with the script.
    Last edited by mikepurvis; 05-26-2012 at 05:31 PM.

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

    Default

    Alright mate, first tag your codes that'll be helpful, first error is because facerotation's parameters are like this as far as i know
    the second parameter the one you get the error in should be float deltatime not globaldeltatime I assume that this one is undefined on your function.

    Code:
    function FaceRotation(Rotator NewRotation,Float DeltaTime)
    {
    }
    And for the second error i can't help you out mate i can't seem to find out where your UDNPlayerController class is
    by the way this might not help as i can't really take a look at your codes without them being "tagged"
    Last edited by reinrag; 02-11-2013 at 03:26 AM.

  4. #4

    Default

    Ok i blocked my code and will try what you said thank you reinrag

  5. #5
    MSgt. Shooter Person
    Join Date
    May 2012
    Location
    France
    Posts
    67

    Default

    Hi ! I am a beginner in UnrealScript and i don't see what must I chnage for the error.

    Thx


 

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.