Home Unreal Engine

Unrealscript doesn't effect anything - help! :S

Hey

So, I've got my skeletal mesh imported to UDK (keep in mind i'm running a blank version of UDK - No unreal tournament.) and I have all my classes set up, like so:

MyGameInfo.uc
MyGamePawn.uc
MyGamePlayerController.uc

My problem is, none of my classes have ANY effect whatsoever...
My game type selected in the world properties is MyGameInfo.uc.

MyGameInfo.uc

class MyGameInfo extends GameInfo;
defaultproperties
{
bDelayedStart=false
PlayerControllerClass=class'MyGamePlayerController'
DefaultPawnClass=class'MyGamePawn'
}

MyGamePawn.uc

class MyGamePawn extends GamePawn
placeable;
var bool bFixedView;
var vector FixedViewLoc;
var rotator FixedViewRot;
var() const editconst LightEnvironmentComponent LightEnvironment;
exec function FixedView()
{
if (!bFixedView)
{
FixedViewLoc = Location;
FixedViewRot = Controller.Rotation;
}
bFixedView = !bFixedView;
}
// overwrite this function to avoid animsets to be be overwritten by default
simulated event bool RestoreAnimSetsToDefault()
{
return FALSE;
}
simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
{
// Override camera FOV for first person castle player
out_FOV = 65.0;
// Handle the fixed camera
if (bFixedView)
{
out_CamLoc = FixedViewLoc;
out_CamRot = FixedViewRot;
}
else
{
return Super.CalcCamera(fDeltaTime, out_CamLoc, out_CamRot, out_FOV);
}
return true;
}
 
/**
* GetPawnViewLocation()
*
* Called by PlayerController to determine camera position in first person view. Returns
* the location at which to place the camera
*/
simulated function Vector GetPawnViewLocation()
{
return Location + EyeHeight * vect(0,0,1);
}
 
defaultproperties
{
Begin Object Name=CollisionCylinder
CollisionRadius=+85.0
CollisionHeight=+140.0
End Object
CylinderComponent=CollisionCylinder
ViewPitchMin=-10000
ViewPitchMax=12000
// @todo: When touching to move while already moving, walking physics may be applied for a single frame.
// This means that if WalkingPct is not 1.0, brakes will be applied and movement will appear to stutter.
// Until we can figure out how to avoid the state transition glitch, we're forcing WalkingPct to 1.0
WalkingPct=+1.0
CrouchedPct=+0.4
BaseEyeHeight=60.0 // 38.0
EyeHeight=60.0 // 38.0
GroundSpeed=500.0
AirSpeed=600.0
WaterSpeed=300.0
AccelRate=2048.0
JumpZ=750.0
CrouchHeight=29.0
CrouchRadius=21.0
WalkableFloorZ=0.78
AlwaysRelevantDistanceSquared=+1960000.0
RotationRate=(Pitch=20000,Yaw=20000,Roll=20000)
AirControl=+0.35
bCanCrouch=true
bCanClimbLadders=True
bCanPickupInventory=True
SightRadius=+12000.0
MaxStepHeight=26.0
MaxJumpHeight=49.0
bScriptTickSpecial=true
Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
bSynthesizeSHLight=TRUE
bUseBooleanEnvironmentShadowing=FALSE
ModShadowFadeoutTime=0.75f
bIsCharacterLightEnvironment=TRUE
bAllowDynamicShadowsOnTranslucency=TRUE
End Object
Components.Add(MyLightEnvironment)
LightEnvironment=MyLightEnvironment
Physics = PHYS_Falling
bDontPossess = TRUE
bRunPhysicsWithNoController = TRUE
Begin Object Class=SkeletalMeshComponent Name=PawnMesh
LightEnvironment=MyLightEnvironment
End Object
Mesh=PawnMesh
Components.Add(PawnMesh)
}

The annoying thing is, is that when I create an archetype of MyGamePawn.uc in the content browser and drop that into the map, I cannot select a skeletal mesh on it, so im forced to using the mobileplaceablepawn.
Is it something to do with the pawnActor that the skeletal mesh is based on?(mobileplaceablepawn)

Or is it to do with my pawn class?

Replies

  • TheGMODSPAZ
    Options
    Offline / Send Message
    Actually never mind guys! I fixed it! What it was (even though it seems irrelevant) was that I missed out 'Placeable;' under the declaration of class. so now I can use MY class for my skeletal mesh, even though it contains the same as MobilePlaceablePawn.uc

    Sorry for the waste of thread!
Sign In or Register to comment.