Scoring use of the hint system - TADS3.1

I am using the hint system in my game and would like to subtract a certain number of game points each time the hint system is accessed. Does anyone have any ideas how to go about doing this? I would like this to be enabled only after the first set of system hints has been viewed.


With the ability in 3.1 to call things from within single-quoted strings, this should be pretty easy. I would create an object called scoreKeeper that would do the actual arithmetic. I would then write hints like this:

++ Goal 'How can we get past the cyclops?' [ '<<scoreKeeper.minusOne(cyclops)>>Oh, dear --- are you sure you want to try? ', ] ;
This assumes (a) that the cyclops is an actual game object, and (b) that scoreKeeper is set up something like this:

cyclopsReduced = nil minusOne(obj) { if ((obj == cyclops) && (!cyclopsReduced)) { cyclopsReduced = true; scoreValue = scoreValue - 1; } }
This insures that the score will be reduced only the first time that that hint is read. Note that this suggestion doesn’t actually tell you how to reduce the score – I haven’t researched that. I’m just suggesting how you would set it up. Possibly you would want to use an Achievement object with a negative value.

Looks good! will give it a shot. Many thanks to you; as usual.