Game score, Points per kill.

Topics regarding Scripting with Reality Factory
Post Reply
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Game score, Points per kill.

Post by incenseman2003 »

I have looked through the manual and have not seen anything about this. I am hoping to find a way to get the player to gain a point value for each badguy they kill and have the ponts update in the hud with each kill. I have not found anything in the forum on this subject and I have abandoned the demos as it is just to hard to even get them to run. I looked through the FAQ and there is talk about HitPoints but that is not what I need. Can someone explaint to me how to score a certain amount of points per kill and have it show in the hud?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

yeah that would be cool
what about
make a variable named score.
put it in your hud
when enemy dies, add one to score var
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

make a variable named score.
put it in your hud
when enemy dies, add one to score var
Yep, that's the way to do it.

A little explanation to the last part:
You can modify attributes in a script with 'ModifyAttribute()' command. So you need to add something like this to the dying order of your enemy script:
ModifyAttribute("score",X,"Player");
where X is the amount you want to add to the score.
Pain is only psychological.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

It works just like I need. I didnt think of the ModifyAttribute command. I was looking for an increase command that would do that. I was so off the right track.

Thanks a ton!!
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
Post Reply