Announcement

Collapse
No announcement yet.

probs with custom playercontroller...

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

  • replied
    After coming back to the forums to ask a question, I thought I'd post.  My custom player extends xPlayer, as that is the basic player used in UT2003 (as far as the log shows anyhow, and my dodgy memory can recall from about 8 months), so it's totally safe to extend this class for your own ends.

    Leave a comment:


  • replied
    "so if you extend xPlayer, your PC counts as a PlayerController AND as UnrealPlayer AND as xPlayer

    i don't see any problems in the long term there..."

    Ok that makes sense. Great !

    Leave a comment:


  • replied
    So, no need for me to post anything (which is good, because I'm very lazy).

    Only just got my Internet back after some storms we had here a couple of days ago, so that's why I'd not posted sooner.

    Leave a comment:


  • replied
    i came to the same solution!

    i looked into the functions causing the errors and found out that they were casting the PC into UnrealPlayer

    UnrealPlayer is extended from PlayerController, so it still is a kind of PlayerController

    same with your PC if you extend it from PlayerController
    BUT if you extend directly from PlayerController, it isn't an UnrealPlayer, that's what causes the error

    so if you extend UnrealPlayer, your PC also counts as an UnrealPlayer and therefore the cast works.


    xPlayer is extended from UnrealPlayer, same thing here
    so if you extend xPlayer, your PC counts as a PlayerController AND as UnrealPlayer AND as xPlayer

    i don't see any problems in the long term there...

    Leave a comment:


  • replied
    A strange solution !

    In the code of the checkmate mod, the PC extends xPlayer !

    So i did the same thing and now everything works !!! No more warning, no more menu disappearing and all my functionnalities are working.

    I'm happy but can someone explain me how that stuff really works ? Is it a good idea to extend the PC from xPlayer in the long term ?

    Leave a comment:


  • replied
    i'm also having this problem
    ut2004, custom PC and standard DM hud in custom gametype (extended from HudCDeathmatch/XDeathmatch respectively)
    but haven't looked into it yet... (maybe some kind of typecast?)
    any help is appreciated

    Leave a comment:


  • replied
    This is for UT2004...

    I've commented out the previous lines in the mutator and add this in the gametype in a timer function

    cp=ConstructPlayer(PlayerController(C)); //C is a Controller

    And i got the same probs....

    When i don't use the custom player controller in a specific line but just add it in the defaultproperties, everything is fine...

    Good cooking !

    Leave a comment:


  • replied
    You didn't say if you're developing for UT2003 or 2004 northrog.

    I've got some food cooking so I'll post more when you answer my simple question (I wrote a new game type that had custom players in it for UT2003, so may be able to offer some help).

    Leave a comment:


  • started a topic probs with custom playercontroller...

    probs with custom playercontroller...

    Hi guys !

    I'm using a custom playercontroller. Here is it :


    //--------------
    class ConstructsPlayer extends PlayerController;

    var string ConstructBotClass;
    var string ConstructOrders;


    defaultproperties
    {
    }
    //---------------


    Yes very small and simple.
    When i write these lines in my mutator in the function "mutate" :

    local ConstructsPlayer cp;
    cp = ConstructsPlayer(Sender);

    everything else using my custom playercontroller has been commented out but obviously the declaration in the gametype...

    I got in the log these errors :

    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:029C) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.GetInfoString:00BC) Accessed None 'PlayerOwner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:029C) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.GetInfoString:00BC) Accessed None 'PlayerOwner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:029C) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.GetInfoString:00BC) Accessed None 'PlayerOwner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:029C) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.GetInfoString:00BC) Accessed None 'PlayerOwner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:029C) Accessed None 'Owner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.GetInfoString:00BC) Accessed None 'PlayerOwner'
    Warning: HudCTeamDeathMatch CTF-Grassyknoll.HudCTeamDeathMatch (Function XInterface.HudCDeathmatch.DrawSpectatingHud:0285) Accessed None 'Owner'


    By the way, as u can see, i'm using a TDM hud in a CTF map. But when I use the normal playercontroller i dont get the error.
    Last info : when i'm using my custom playercontroller my speech button doesn't work, my player model is the defaut one, etc.
    Can someone help me ?
Working...
X