Where would i look to do this, it wasnt where i thought it would be(srhumanpawn). So i have no idea where else it would be, thanks
Where would i look to do this, it wasnt where i thought it would be(srhumanpawn). So i have no idea where else it would be, thanks
var float HealthMax;
Pawn.uc
Code:var float HealthMax;
//=============================================================================
// Pawn, the base class of all actors that can be controlled by players or AI.
//
// Pawns are the physical representations of players and creatures in a level.
// Pawns have a mesh, collision, and physics. Pawns can take damage, make sounds,
// and hold weapons and other inventory. In short, they are responsible for all
// physical interaction between the player or AI and the world.
//
// This is a built-in Unreal class and it shouldn't be modified.
// Test To see if more health is given?
//=============================================================================
class DeathsDoorPawn extends Pawn
abstract
native
placeable
config(user)
nativereplication
exportstructs;
// Player info.
var float HealthMax;
var float SuperHealthMax;
var travel int Health; // Health: 100 = normal maximum
defaultproperties
{
Health=150
HealthMax=200
SuperHealthMax=200
}
Small problem... Now it was explained to me, i can extend a class to edit it, without replacing...
So i did this...
Code://============================================================================= // Pawn, the base class of all actors that can be controlled by players or AI. // // Pawns are the physical representations of players and creatures in a level. // Pawns have a mesh, collision, and physics. Pawns can take damage, make sounds, // and hold weapons and other inventory. In short, they are responsible for all // physical interaction between the player or AI and the world. // // This is a built-in Unreal class and it shouldn't be modified. // Test To see if more health is given? //============================================================================= class DeathsDoorPawn extends Pawn abstract native placeable config(user) nativereplication exportstructs; // Player info. var float HealthMax; var float SuperHealthMax; var travel int Health; // Health: 100 = normal maximum defaultproperties { Health=150 HealthMax=200 SuperHealthMax=200 }
However when i try to compile it says this...
The file '..\DeathsDoor\Inc\DeathsDoorClasses.h' needs to be updated. Do you wa
nt to overwrite the existing version? (Y/N):
If i hit no, it moves and exports fine. However i cant seem to increase my health(however all i tryed was vannila syringe, and medic nade on the ground).
If i hit yes on the prompt, it errors out saying it cant find the file.
Thoughts?
A little hint. By the sounds of it, you are using ServerPerks. ServerPerks uses it's own Pawn class which it forces the game to use through it's mutator. If you're trying to do the same, they will conflict. You are better off making a mutator to force your new pawn but extend off the ServerPerks pawn (SRPawn I believe). If you don't do that, you are not using a single bit of code from the ServerPerks Pawn and the one/two extended before that. If you want to force the health then change the default property, nothing more then that.
var float HealthMax;
var float SuperHealthMax;
var travel int Health; // Health: 100 = normal maximum
defaultproperties
{
Health=150
HealthMax=200
SuperHealthMax=200
}
Allow me to re explain, the code i pasted is irrelevant, I added the Health portions to the srhumanpawn, but its still not overriding it
To clarify, this is now in SRHumanPawn
Code:var float HealthMax; var float SuperHealthMax; var travel int Health; // Health: 100 = normal maximum defaultproperties { Health=150 HealthMax=200 SuperHealthMax=200 }
Im used to Java, i have a mod for minecraft(lol i know). Anyways, with the java mc uses, when i extend an function, i still need to call its varibles, but ill try removing them and seeing, thanks.
Woo, that worked, thanks mark.