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
walljump code in my pawnCode: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); } }
credit for these codes belong to http://www.froyok.fr/blog/2011-06-code-exil-wall-jumpCode: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; }



Reply With Quote

Bookmarks