Results 1 to 3 of 3

Hybrid View

  1. #1

    Default quick newbie problem: "can't spawn player"

    basically i'm getting these warnings (followed by a "can't spawn player" error when i try to run the game):

    [0041.60] C:\UDK\UDK-2012-07\Development\Src\UTGame\Classes\UTGame.uc(3369) : Warning, ClassProperty Engine.GameInfo:PlayerControllerClass: unresolved reference
    to 'class'ActionPlayerController''
    [0041.60] C:\UDK\UDK-2012-07\Development\Src\UTGame\Classes\UTGame.uc(3369) : Warning, Invalid property value in defaults: PlayerControllerClass=class'Acti
    onPlayerController'
    [0041.61] C:\UDK\UDK-2012-07\Development\Src\UTGame\Classes\UTGame.uc(3371) : Warning, ClassProperty Engine.GameInfoefaultPawnClass: unresolved reference to '
    class'ActionPawn''
    [0041.61] C:\UDK\UDK-2012-07\Development\Src\UTGame\Classes\UTGame.uc(3371) : Warning, Invalid property value in defaults: DefaultPawnClass=class'ActionPaw
    n'

    i have basically added a folder titled "MyScripts" (with a "Classes" folder) to the "Development\Src" folder and in it ("Classes") i have added 2 files that i got from these forums: "ActionPawn.uc" and "ActionPlayerController.uc". i have also modified some properties in "UTGame.uc" to this:

    Code:
    	PlayerControllerClass=class'ActionPlayerController'
    	DefaultPawnClass=class'ActionPawn'
    i have also added the line "+EditPackages=MyScripts" to the "[UnrealEd.EditorEngine]" section in "DefaultEngine.ini". my guess is that UDK can't find the classes that i have added because i have missed a dot somewhere. can anyone help?

    if it helps, the first line of "ActionPawn.uc" is:
    Code:
    class ActionPawn extends UTPawn;
    and the first line of "ActionPlayerController.uc" is:
    Code:
    class ActionPlayerController extends UTPlayerController;
    Last edited by madima; 08-11-2012 at 05:03 PM.

  2. #2
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,287

    Default

    Probably...

    Code:
    PlayerControllerClass = class'MyScripts.ActionPlayerController'
    DefaultPawnClass = class'MyScripts.ActionPawn'
    Also I would advise creating your own game info class, extending UTGame. Even though UTGame isn't native and should be safe to edit, it's still safer and more elegant than modifying the installed game code. In the above case you'll likely run into a dependency issue anyway because UTGame is compiled before your scripts. If you try swapping the compile order around you'll run into worse trouble further down the line.

    Code:
    class MyGame extends UTGame;
    
    DefaultProperties
    {
        PlayerControllerClass = class'MyScripts.ActionPlayerController'
        DefaultPawnClass = class'MyScripts.ActionPawn'
    }
    You then need to run the game using MyGame instead of UTGame.

  3. #3

    Default

    Quote Originally Posted by Spoof View Post
    Probably...

    Code:
    PlayerControllerClass = class'MyScripts.ActionPlayerController'
    DefaultPawnClass = class'MyScripts.ActionPawn'
    Also I would advise creating your own game info class, extending UTGame. Even though UTGame isn't native and should be safe to edit, it's still safer and more elegant than modifying the installed game code. In the above case you'll likely run into a dependency issue anyway because UTGame is compiled before your scripts. If you try swapping the compile order around you'll run into worse trouble further down the line.

    Code:
    class MyGame extends UTGame;
    
    DefaultProperties
    {
        PlayerControllerClass = class'MyScripts.ActionPlayerController'
        DefaultPawnClass = class'MyScripts.ActionPawn'
    }
    You then need to run the game using MyGame instead of UTGame.
    thanks for the reply, spoof. it seems like the dependency thing that was the problem. it worked when i made the MyGame class and i didn't even need the 'MyScripts.' part.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.