Announcement

Collapse
No announcement yet.

why my pawn it's not showing ???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    why my pawn it's not showing ???

    i have made a level with my custom pawn and my custom bots, the level plays very fine in the level editor, but when i press "start This level On PC" or launch the level from the frontend or cook the game to install and then play with the installed game, my custom pawn is replaced by the default pawn of the editor, i don't know where is the problem because when i have compiled the scripts there is 0 errors and 0 warnings and in the level editor my pawn is working perfect, here is the code of my custom pawn

    Code:
    class pacmanPawn extends GamePawn;
    
    var() int ScorePoints;
    var() int PlayerLive;
    
    //agrega puntos al score
    function AddScore(SeqAct_AddScorePoints MyAction)
    {
       // Lets create a new inventory item to hold the values passed //
      local int puntos;
      // Instantiate it //
      puntos=MyAction.Score;
      ScorePoints=puntos;
      // actualizo la variable para pasarla al hud
      SPlayerReplicationInfo(PlayerReplicationInfo).SetPuntos(ScorePoints);
    }
    
    //agrega puntos al score
    function AddLives(SeqAct_AddPlayerLives MyAction)
    {
       // Lets create a new inventory item to hold the values passed //
      local int vidas;
      // Instantiate it //
      vidas=MyAction.Lives;
      PlayerLive=vidas;
      // actualizo la variable para pasarla al hud
      SPlayerReplicationInfo(PlayerReplicationInfo).SetVidas(PlayerLive);
    }
    
    //Updates Health any time the Player Takes Damage
    function TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
    {
    	super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
    
    	SPlayerReplicationInfo(PlayerReplicationInfo).SetHealth(Health);
    
    		//Makes sure the count never goes into negative numbers
    		if( Health <= 0 )
    		{
    		SPlayerReplicationInfo(PlayerReplicationInfo).SetHealth(0);
    		}
    
    
    }
    
    
    //Updates Health when the player is spawned
    function PossessedBy(Controller C, bool bVehicleTransition)
    {
    	Super.PossessedBy(C, bVehicleTransition);
    
    	SPlayerReplicationInfo(PlayerReplicationInfo).SetHealth(Health);
    
    }
    
    
    //Updates Health when the player dies
    function UnPossessed()
    {
    	SPlayerReplicationInfo(PlayerReplicationInfo).SetHealth(0);
    
    }
    
    
    defaultproperties
    {
    	// Begin Object Name=WPawnSkeletalMeshComponent
    	//	bOwnerNoSee=false
    	// End Object
    
    	Begin Object class=SkeletalMeshComponent Name=SkeletalMeshComponent0
    		SkeletalMesh=SkeletalMesh'MyPackage.Meshes.demon'
    		AnimSets(0)=AnimSet'MyPackage.AnimSet.demon_move'
    		AnimTreeTemplate=AnimTree'MyPackage.AnimTree.demon_animtree'
    		bHasPhysicsAssetInstance=True
    		bEnableSoftBodySimulation=True
    		bSoftBodyAwakeOnStartup=True
    	End Object
    	Mesh=SkeletalMeshComponent0
    	Components.Add(SkeletalMeshComponent0)
    
    	Name="Default__pacmanPawn"
    }
    i have tried to extends from a UTPawn but when i use it my custom pawn doesn't show, only work when i extends from the gamepawn class.

    i need some help here, can somebody tell me where or what is missing here ?

    thank you in advance.

    #2
    What folder did you save MyPackage.upk to. if its not in the Content folder the GAME cant see it. Sometimes you have to copy your package to the cooked pc folder.

    Comment


      #3
      mypackage is in the folder, but when the game start there is a warning message:

      kismet warning: obj utpawn_0 has no handler for SeqAddScorePoints_0

      this warning point to a custom function in my custom pawn file, i'm thinking that the game is not reading my custom gamepawn classs or something like that.

      why kismet send the warning message pointing to utpawn if my pawn extends from gamepawn?

      p.s.: my custom hud is not showing too

      p.s. 2: i have looked into the level editor and in the worldinfo properties i have change the default game type for my gameinfo class, i put the my game info class in the defaultgame.ini in the line

      DefaultGameType="pacman.pacmanInfo";

      but the result is the same, how can i change the default game type in the config ini files ?

      Comment


        #4
        Hi i'm sure this link will help you to find what you also need .(for your characters )
        http://sites.google.com/site/ut40kmo.../udk-tutorials

        Comment


          #5
          thank you abraham2 ....

          Comment

          Working...
          X