Page 1 of 1

ModifyAttribute...huh?

Posted: Tue Jun 02, 2009 8:56 pm
by metal_head
Well you all know that ModifyAttribute is the command for modifying a defined attribute, I got this attribute called "kill" in the player.ini file and I want it to get +1 every time I kill a person, ok, in the death order (it's High level) I've added

Code: Select all

ModifyAttribute("kill", 1);

What I want is to have an attribute that counts kills, but the attribute doesn't change, it stays on 0 no matter how pawns (with the same script) I kill.

Re: ModifyAttribute...huh?

Posted: Tue Jun 02, 2009 9:45 pm
by QuestOfDreams
For modifying the player's attribute you must use

Code: Select all

ModifyAttribute("kill", 1, "Player");
The line

Code: Select all

ModifyAttribute("kill", 1);
would try to modify the Pawn's attribute "kill", which you haven't given to the Pawn (via the AddAttribute method) and so it cannot be change.

(Note that this is different from Conversation and LevelController scripts)

Re: ModifyAttribute...huh?

Posted: Tue Jun 02, 2009 10:05 pm
by metal_head
Oh thanks, I though that if I don't define the entity name it will modify the player's kill attribute, but I've been wrong.