Making Status Attributes change over time.

I'm making a game where your stats decrease over time and have some objects restore them. How do I do something like that?

It depends how you want them to change. After every action? Every new room? At timed intervals?

I'd probably go for at intervals based on activity. So, for example, every 5 turns. So I'd make a turnscript like:

if (HasInt (this, "delaytimer")) {
  this.count = this.count + 1
  if (this.count >= 5) {
    this.count = null
    player.strength = player.strength - 1
    // if you  want to do something when it hits zero
    // you could insert the script here or use a changescript
else {
  this.count = 1

Thanks. I'm planning for the attributes to decrease each action. How do I make them start at max?

Log in to post a reply.