Hello there, I'm new in unreal scripting.
I follow http://forums.epicgames.com/showthread.php?t=716237
in order to make a new game using UDK.
But why is it flying, not walking.
Is there any ways to make it walking?
Hello there, I'm new in unreal scripting.
I follow http://forums.epicgames.com/showthread.php?t=716237
in order to make a new game using UDK.
But why is it flying, not walking.
Is there any ways to make it walking?
If your pawn class extends from UDKPawn, be sure to set CustomGravityScaling=1.0 in the default properties of your pawn class.
I'm sorry, but I do not understand.
So, I just add CustomGravityScaling=1.0 inside yourpawn?(according to http://forums.epicgames.com/showthread.php?t=716237)
But it did not work.
Hello, you can try the follow:
Open the Skeletal Mesh via ContentBrowser
In the Mesh Properties (Left Bottom) check the Origin in Z, if it is in 0, put it in -51, if it is in -51 and not working, try -85.
Let me know if it worked
in your extended class from GameInfo, make sure you included
bDelayedStart = false
in the default properties. I know it was covered in the link, but it's the first thing that comes to mind that might have been missed that causes this effect.
Last edited by Wizzard~Of~Ozz; 02-19-2010 at 06:46 AM.
Or if you want to actually start in spectator mode set brestartlevel=false;
wizzard of oz is correct from the sounds. the game is waiting for a start match command, which if your not extending UT content wont be there natively. Set your gameinfo bDelayedStart property to false and you should start your level directly as the default controller and not as a spectator.
I'm totally lost, sorry.
same here. I need more detail explanationOriginally Posted by Contagion
like that?class yourGame extends GameInfo;
defaultproperties
{
PlayerControllerClass=class'yourGame.yourPlayerCon troller'
DefaultPawnClass=class'yourGame.yourPawn'
bDelayedStart=false
}
Last edited by riowahab; 02-19-2010 at 12:03 PM.
bDelayedStart=false will place the game at start immediately.
bRestartLevel=false will allow spec mode then when you left click it will start the match.
by default my script is bDelayedStart=false (same as the tutorial)
but still flying not walking
see this video if you have time. (6.58-7.20)
http://www.youtube.com/watch?v=aEFyjUK23gQ
the result is the same like that. Flying around the map.![]()
If you can post your code for your GameInfo class you created.
Are you sure your flying or does it just appear your flying. For instance if you are starting with base classes your pawn has no actual view so it appears your flying. When you run the game and then left click to start are you able to fly into the air still?
You most likely need to set a skeletalmesh for your defaultpawn and then it will seem like your not flying.
Last edited by Contagion; 02-19-2010 at 01:41 PM.
I followed exactly from here
http://forums.epicgames.com/showthread.php?t=716237
I'm totaly sure all the same.
I tried to copy and paste it from UTPawn (I mean to put the same skeletal meshes), but it is still the same. Flying, not walking.
I have not tried to left click, I will try now, and post the update.
so, considering that the default behavior for the game, is that you click to spawn, you've never actually tried that?
I did same exactly like this, no script changes.
http://forums.epicgames.com/showthread.php?t=716237
I tried to press everything that my mouse has, but no respond.
I run it from application, I mean I just right click, and "play from here".
how to do that?the pawn is also same like
http://forums.epicgames.com/showthread.php?t=716237
Do you have playerstarts in your level?
The only thing I can think of is your code is not correct though you think you have it accurate. I would recheck your code or paste it here so everyone can see what exactly you have down.
OK, this is my code.
this is my yourGame.uc
class yourGame extends GameInfo;
defaultproperties
{
PlayerControllerClass=class'yourGame.yourPlayerCon troller'
DefaultPawnClass=class'yourGame.yourPawn'
bDelayedStart=false
}
this is my yourPawn.uc
this is my yourPlayerController.ucclass yourPawn extends GamePawn placeable;
enum Ecamerastyle
{
Fixed,
ThirdPerson,
FreeCam,
FreeCam_Default,
FirstPerson
};
var() Ecamerastyle camerastyle;
simulated function bool CalcCamera(float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV)
{
local vector start, end, hl, hn, myLocation;
local actor a;
myLocation = Location;
start = Location;
if (Controller != none)
{
end = myLocation - Vector(Controller.Rotation) * 196.f;
}
else
{
end = myLocation - Vector(Rotation) * 196.f;
}
//start.Z += 120.f;
end.Z += 120.f;
a = Trace(hl, hn, end, start, false);
if (a != none)
{
out_CamLoc = hl;
}
else
{
out_CamLoc = end;
}
out_CamRot = Rotator(Location - out_CamLoc);
return true;
}
simulated function name GetDefaultCameraMode( PlayerController RequestedBy )
{
`Log("Calling the ThirdPerson Cam");
switch( CameraStyle )
{
case 0: return 'Fixed'; break;
case 1: return 'ThirdPerson'; break;
case 2: return 'FreeCam'; break;
case 3: return 'FreeCam_Default'; break;
case 4: return 'FirstPerson'; break;
default:return 'ThirdPerson'; break;
}
return 'ThirdPerson';
}
defaultproperties
{
Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
ModShadowFadeoutTime=0.25
MinTimeBetweenFullUpdates=0.2
AmbientGlow=(R=.01,G=.01,B=.01,A=1)
AmbientShadowColor=(R=0.15,G=0.15,B=0.15)
LightShadowMode=LightShadow_ModulateBetter
ShadowFilterQuality=SFQ_High
bSynthesizeSHLight=TRUE
End Object
Components.Add(MyLightEnvironment)
Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh
CastShadow=true
bCastDynamicShadow=true
bOwnerNoSee=false
LightEnvironment=MyLightEnvironment;
CollideActors=true;
BlockZeroExtent=true;
PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_C H_Corrupt_Male_Physics'
AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman _AimOffset'
AnimSets(1)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman _BaseMale'
AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_ Human'
SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_ CH_LIAM_Cathode'
RBCollideWithChannels=(Default=true,GameplayPhysic s=true,Pawn=true)
bHasPhysicsAssetInstance=true
PhysicsWeight=1.0f
BlockRigidBody=true;
End Object
Mesh=InitialSkeletalMesh;
Components.Add(InitialSkeletalMesh);
CollisionType=COLLIDE_BlockAll
// added to stop the pawn from floating in the air.. not sure why it does.
Begin Object Name=CollisionCylinder
CollisionRadius=+0021.000000
CollisionHeight=+0048.000000
End Object
CylinderComponent=CollisionCylinder
camerastyle=thirdperson;
I change the DefaultGame.iniclass yourPlayerController extends GamePlayerController
dependson(yourPawn);
defaultproperties
{
//CameraClass=class'yourCamera'
}
and DefaultEngine.ini[Configuration]
BasedOn=..\Engine\Config\BaseGame.ini
[Engine.GameInfo]
DefaultGame=yourGame.yourGame
DefaultServerGame=yourGame.yourGame
PlayerControllerClassName=yourGame.yourPlayerContr oller
GameDifficulty=+1.0
MaxPlayers=32
ModEditPackages=yourGame
the result is same as
http://www.youtube.com/watch?v=aEFyjUK23gQ (6.58-7.20)
Thank you.
Ok and in your map how are you spawning the pawn?
What map are you running? Is it a custom? Have you tried running your game through the exe as opposed through the editor?
ok do me a favor and put a playerstart actor in the map somewhere on the ground. Build your map fully then try your start from here.
3 Options:
Option 1: I want you to load your game through udk.exe not frontend. You need to create an exe file to run your game. My tutorials on youtube show you this in the basic setup. Once you do this and your level loads, I want you to type without the quotes "displayall yourplayercontroller pawn" Then press your left click button if nothing happens then see if it has a value for pawn. If not you aren't spawning a pawn. If you do and you are still floating around then you have to had changed some other code to cause spectating mode.
Option 2: Give up on this guys tutorial and just follow mine from youtube. Set up the game files and the skeletalmesh then if you want to use his camera stuff add it in after you know you can spawn a skeletalmesh.
Option 3: start removing functionality till it works.
You got it, of course if you dont have a skeletalmesh use the default guy that the UT game offers.
First part is done, and it's alright.
I played from the Dots.exe (I put my own map)
is the result is flying?
Last edited by riowahab; 02-22-2010 at 02:58 PM.
I cant remember what I said to put in defaultproperties. However it will seem like your "flying" because the skeletalmesh does not exist yet.
This guy needs to reinstall UDK from scratch and do Hourences tutorial, no offense contagion but it gives a much broader aspect at getting a game working, your tutorials are excellent but more for specific things, btw do all the tutorials on your website that you pay for only last under 10 minutes ? I ment to ask
I have a question about the skeletal mesh.
What to put after the SkeletalMesh=SkeletalMesh' ..................?
in your tutorial your using your own model, but in mine I will use the UT Skeletal mesh because it is FPS game.
the model is under Content-UTGame-Characters-SK_CH_IronGuard_MaleA
and the animsets is K_AniHuman_AimOffset[153]
and what to put under AnimTreeTemplate?
They range from 8-15 it really just depends. I try to keep them on average to 10 minutes and break them down in parts. As for the tutorials, though they are based on a specific game creation, the coding is the same you just need to make adjustments for your own situation. I just use the Dots project to show the progression, eventually there would be more game versions but for now just good ol dots.
For your skeletalmesh use the default guy which is the Liandri_male character.
SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Catho de'
Don't worry about animation till you know your skeletalmesh is loading then go ahead and add the default stuff given in the UTFamily_info class for the liandri male. Also you can keep the anim tree to what the UT version is if you would like to also.
For some reason a space is showing up... shouldnt be any spaces in the skeletalmesh
so the rough DPawn is like this?
class DPawn extends GamePawn;
defaultproperties
{
Begin Object Class=SkeletalMeshComponent Name=DPawnSkelMeshComp
bOwnerNoSee=false
CastShadow=true
SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_ CH_LIAM_Catho de'
End Object
Mesh=DPawnSkelMeshComp
Components.Add(DPawnSkelMeshComp)
}
Last edited by riowahab; 02-22-2010 at 03:27 PM.
Yup thats it. Now when you spawn in first person view move your mouse up so your turning the camera and you should see your pawn underneath you.
Rio I want you to uninstall everything and then reinstall like McTavish mentioned. You had to of caused some sort of issue before doing these tutorials. I am not sure your problem. You can try following my third person tutorial and see if you move the pawn in front of you whether it will appear. Otherwise start over delete the whole folder and begin anew.
When you compiled in front end did you get any warnings? If you cant remember try adding a space to whitespace in your code and resave your file then make it again. If you just make it again warnings get overlooked. You can go into your editor and look to make sure you have that skeletalmesh. Also if you have ANY and i mean ANY kismet going remove it all. Just in case something funny was set and is causing an issue.
Bookmarks