Originally Posted by
st0724
Pretty neat! I didn't know you could use SetInt to do that.
It's not an engine function like the GetInt() address posted above is. My Actor::Attribute() method returns an Attribute reference, which is basically just a wrapper around the attribute object pointer as used by the native GetInt/GetDouble.
The point was just to mention that if you set it to zero you can instantly res, not how to set it to zero
Originally Posted by
StealthyXor
your localplayer structure/object interests me much =d
seems like you've figured out how all this fits together
It's just a wrapper for RActor. Calling Attribute(name_or_id) actually translates in to something like
GetACD(actor.acdid).GetFAG(acd.fagid).GetAttribute(name_or_id);
All this OOP of course. I like the challenge of not having the engine funcs available
Oh, and for knowing if an attribute is int or float..
Code:
struct AttributeDesc
{
/* 0x00 */ int id;
/* 0x04 */ int DefaultVal; // for when trying to get an attribute that doesn't exist in a FastAttributeGroup
/* 0x08 */ int unk2;
/* 0x0C */ int unk3;
/* 0x10 */ int Type; // 0 = float, 1 = int
/* 0x14 */ char* Formula1;
/* 0x18 */ char* Formula2;
/* 0x1C */ char* Name;
/* 0x20 */ void* unk5;
/* 0x24 */ int unk6;
};
AttributeDesc* AttributeDescriptionList = (AttributeDesc*)0x1557518; // 9950
int GetAttributeType(int id)
{
return AttributeDescriptionList[id].Type;
}