Displaying a percentage in a custom pane

Can someone help: Can I move the following code from the status pane to a custom pane (or, more simply to remove the score from the status pane and only show the progress percentage from the code):

game.changedscore => {
  this.percentscore = 100 * this.score / 90
}
do (game, "changedscore")
dictionary add (game.statusattributes, "percentscore", "Progress: !% of Chapter 1")

At the moment this code generates a progress percentage that is currently displayed in the status pane, but that also shows the score (if I switch off score the status pane is removed). I would like to display just the progress. I presume a custom pane is the answer, but I don't know how to render this kind of code in a custom pane. Any help most welcome!


The "score" feature automatically includes the score in the status attributes, immediately before running the start script.

So to remove the score, I think you should be able to put:

dictionary remove (game.statusattributes, "score")

in your start script.


Thank-you so much, both for your promptness in response and the for the perfect solution! ...the elegant solutions always seem so simple (when you know how!)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums