I just want to display a status attribute that reads HP: currenthp / maxhp (HP: 100 / 100)
I am totally stumped and really am lacking the knowledge to proceed any further. Any help would really be appreciated.
Status attributes display their value. If it's a string containing some text, that text will be displayed.
What you probably want to do is give your type two script attributes named changedcurrenthp
and changedmaxhp
. These would both contain a line like:
this.HP = this.currenthp + "/" + this.maxhp
Whenever currenthp
is changed, the corresponding changescript runs automatically. In this case, it would set the HP attribute to a string like "95/100", which can be displayed using the statusattributes system.
I just used ! as the variable in the status attribute box at the top of the object's attribute page.
This is the page I followed.
https://docs.textadventures.co.uk/quest/status_attributes.html