Page 1 of 1

Help please

Posted: Sat Aug 29, 2009 2:14 am
by John
hello, I need help please, the problem is that I have tried everything, and I can not make a hud that shows the life of my player script, I created the respective hud and hud attribute for that, and nothing works for me: the case is I think I might be wrong as using the controls attribute, nothing happens, someone please talk to me as I make a hud to show player attributes of my script. :cry:

player.ini


[stamina]
...ok


hud.ini

[hud]
....ok

playerscript.s

SetAttribute("Stamina",GetAttribute("Stamina")+1);

Hud no up... :oops: :cry:

Re: Help please

Posted: Sat Aug 29, 2009 2:49 am
by darksmaster923
I'm not sure what you're trying to say, but thats not how to use a SetAttribute. Use ModifyAttribute("stamina",1,"Player"); And script commands are case sensitive

Re: Help please

Posted: Mon Aug 31, 2009 4:21 pm
by metal_head
SetAttribute("Stamina",GetAttribute("Stamina")+1);
This won't work, cuz it sets the PAWN'S "Stamina" attribute, you should specify the name of the entity you wish to change it's attribute, so in this case it would be:

Code: Select all

SetAttribute("Stamina",GetAttribute("Stamina")+1, "Player");

Re: Help please

Posted: Mon Aug 31, 2009 8:52 pm
by John
hello truth does not work, its a bug and will report below, as I command works correctly from a level control.

greetings :?

Re: Help please

Posted: Mon Aug 31, 2009 10:01 pm
by QuestOfDreams
Level Controller script methods differ from pawn script methods in this case. Read the manual :!: