Jump to content

Modifying character properties?


zunnie

Recommended Posts

I'm trying to modify (for testing purposes) the GDI Soldier for now but this code here does not seem to work:

function ModifyPlayer(Pawn Other)
{
    if (Other.IsA('Rx_FamilyInfo_GDI_Soldier') && Other.HealthMax != 1000)
    {
        Other.HealthMax=1000;
        Other.Health=1000;
    }

    super.ModifyPlayer(Other);
}

 

I also tried this, with an extended test, which also does not seem to do much:
 

function bool CheckReplacement(Actor Other)
{
	if (Other.IsA('Rx_FamilyInfo_GDI_Soldier') && !Other.IsA('Test_FamilyInfo_GDI_Soldier'))
	{
		ReplaceWith(Other,"Test_FamilyInfo_GDI_Soldier");
	}

	return true;
}

Can anyone help me with this perhaps? How do i override the default GDI Soldier (or other characters for that matter) with a mutator? :o

Link to comment
Share on other sites

Here is the Change health part

 

class Rx_Mutator_NormalizeHealth_Pawn extends Rx_Pawn ;

simulated event PostInitAnimTree(SkeletalMeshComponent SkelComp) {
	Super.PostInitAnimTree(SkelComp) ;
	if (SkelComp == Mesh) { SetTimer(0.5, false, 'NormalizeHealth' ) ; 	}
}

simulated function bool NormalizeHealth () {
	healthmax = 200 ;
	health = 200 ; 
	return true; 
}
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...