Announcement

Collapse
No announcement yet.

Changing Models in game

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

    Changing Models in game

    I cant seem to change the actual player models in game

    Hers the code

    Theres a Command to change the Pawn from one to another if you type a COmmand in Console, but it doesnt change the player model

    Code:
    function RestartPlayerB( Controller aPlayer )
    {
    if (aPlayer.PlayerReplicationInfo.Team.TeamIndex==0)
    {
    aPlayer.PawnClass=Class'CVMMHero';
        }
         else
        {
    aPlayer.PawnClass=Class'CVMNormal'; }
    
    Super.RestartPlayer(aPlayer);

    #2
    Try:

    Code:
    function RestartPlayer( Controller aPlayer ){
    
    Super.RestartPlayer(aPlayer);   
    if (aPlayer.PlayerReplicationInfo.Team.TeamIndex==0){
            aPlayer.PawnClass=Class'CVMMHero';
        } else {
            aPlayer.PawnClass=Class'CVMNormal'; 
        }
    }
    Since the Super version of RestartPlayer resets the PawnClass and your calling it last, so your code will not work..

    Also, shouldn't you have RestartPlayer not RestartPlayerB ?

    Comment

    Working...
    X