Updating Attributes with Scripts
thymetuo
24 Aug 2017, 18:06I'm trying to keep track of two attributes for my player. When they do something, I want to be able to increase or decrease the value of that attribute. Also, I want to do something so that if the player commands something with the attribute score at a certain value, I can run a different script than if that value were higher.
One of my attributes I want to keep track of is "badness." My starting value is 10. If the player "hits", then their badness needs to go up. (Also, I want badness to go up less the first time than additional times, but I figure I just need a first time script) Then, if they "self reflect" I want it to say "you are very bad" if the value is greater than 10, "you are bad" at 10 or less, and then "you are good" at 0.
How might I go about doing this? Is there further complications by trying to do this with another attribute? Can I change both attributes in the same command/verb?

Doctor Agon
24 Aug 2017, 18:21Hi thymetuo. Check out this previous thread on getting drunk, obviously, you'll have to change the attribute from 'alcohol_level' to 'badness'. But it might give you a starting place on how to go about scripting your idea.
https://textadventures.co.uk/forum/quest/topic/4947/getting-drunk
thymetuo
24 Aug 2017, 18:54Thank you so much!