PDA

View Full Version : Jump() Override



Tron86
03-21-2010, 10:09 PM
Hello,

I am new to the Unreal community, and I am really looking forward to getting into the UDK some more. I am fairly familiar with C/C++/C#, so the unreal script is very homely to me :) With that being said onto the problem, I am using The Ball's tutorial for creating a simple game, and it works perfectly. However I am trying to over ride the Jump() function with my own code. I have successfully got it to work with the StartFire function. Here is my PlayerController file contents:


class AFDPlayerController extends UTPlayerController;

event Possess (Pawn inPawn, bool bVehicleTransition)
{
Super.Possess(inPawn, bVehicleTransition);
SetBehindView(true);
}

auto state PlayerWalking
{
exec function Jump()
{
ClientMessage("Jump!!");
}

exec function Startfire( optional byte FireModeNum)
{
ClientMessage("Fire!!");
}
}

defaultproperties
{
Name="Default__AFDPlayerController"
}

I never see Jump!!. Fire!! always works fine, and even overriding the jump function outside the state PlayerWalking block it does not work. I am kind of confused as to why this is, being Jump in the console makes the player jump just fine. Any insight would be greatly appreciated, I plan to modify the jump code so the player will be able to fly using jump(stamina based).

houghtob123
03-25-2011, 12:27 PM
Wait... You want to get rid of the space bar usage and use another? You could do it through kismet and DefaultInput.ini (if you want an example... just ask)