object.ContentCount recall? Need help ASAP!

XanMag
01 Apr 2018, 01:42

Thanks, folks!

I have an object with a integer attribute on it called 'ContentCount'. Whenever certain things happen, I increase this ContentCount by one.

When the player chooses to end the game, I want to print that integer attribute.

For example,

'You've chosen to end the game with a score of x/20' with 'x' being the current ContentCount integer. I do not want to use score in the game, I just want to count the number of things collected and reference it at game's end.

Thanks in advance!


K.V.
01 Apr 2018, 01:48

Being sure to put your object's actual name in place of object:

msg ("You've chosen to end the game with a score of {=ToString(object.ContentCount)}/20")

or

msg ("You've chosen to end the game with a score of " + object.ContentCount + "/20")