Hi all,
hopefully this is the right place to ask this sort of question…
I’m writing an adventure where the Player has a special ability to change certain game objects into alternate versions (eg. light to dark). And so far, it’s been fine for normal Thing objects where I hide the old object and show the new one using the sightPresence attribute.
However, it hasn’t been going so well for roomParts.
So I have a roomPart (a ceiling) that is initially invisible (I used sightPresence = false).
Then when I perform another action, it makes this object (the dark ceiling) visible and hides the existing ceiling (the light ceiling).
Up to here, things work…
However, the dark ceiling is a special case in that as soon as it’s examined, it needs to become invisible again and the light ceiling replaces it (Player did not have enough power to transform the light ceiling permanently).
Here’s my code - TADS won’t allow it to compile unless I remove the sightPresence = false; statement.
darkCeiling: RoomPart 'dark ceiling' 'dark ceiling'
"The ceiling is now clear glass. You can make out a figure above. Are they watching you? The rather
hideous lion mask they are wearing makes it hard to tell. But before you can get a better look,
the ceiling shimmers and frosts over. "
sightPresence = false;
dobjFor(Examine)
{
afterAction()
{
inherited();
sightPresence = false;
lightCeiling.sightPresence = true;
}
}
Am I going about this the right way?
It seems TADS doesn’t think that I can examine the invisible ceiling in it’s declaration (even though I can change that attribute in another object’s actions)
This is in TADS 3 by the way.
Any advice welcome!