Help please

Topics regarding Scripting with Reality Factory
Post Reply
John
Posts: 29
Joined: Sun Aug 16, 2009 10:40 pm

Help please

Post 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:
Last edited by John on Mon Aug 31, 2009 9:08 pm, edited 1 time in total.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: Help please

Post 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
Herp derp.
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Help please

Post 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");
John
Posts: 29
Joined: Sun Aug 16, 2009 10:40 pm

Re: Help please

Post by John »

hello truth does not work, its a bug and will report below, as I command works correctly from a level control.

greetings :?
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Help please

Post by QuestOfDreams »

Level Controller script methods differ from pawn script methods in this case. Read the manual :!:
Post Reply