Results 1 to 5 of 5

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


 

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.