I have built what seems a nifty, perhaps an abuse of TADS/a3Lite, mean of easily having multiple inactive buttons with only one object, but QTads throws a nil obj reference error.
The relevant code is below (with the definition changed for avoiding spoilers, and yes, was the original “color-based puzzle”, but I have found a nifter, blind-friendly, solution, based on certain names):
inactive: Button, Component ';button buttons stone stones; black, white, red, cyan, magenta, green, yellow, gray, orange, purple, pink, brown; it
them'
desc = "The button's shape, appareance, colors and layout on the
plate, has a striking rensemblance to [SPOILER], to the point that for convenience, you have named these buttons after the twelwe [SPOILER]."
location = [SPOILER] // the surface where the buttons have
/* TODO: this is probably the "first contact" (literally !) with the
magic(k)al nature of Etuye, so to be improved re. magikno */
feelDesc = "feeling around the buttons, you feel a weak but strange tingling
sensation around the tip of the fingers."
touchDesc = "Touching the button, you strange tingling sensation on the
fingers touching it."
makePushed() {
"You try to push the Ruben button. Aside the strange tingling, nothing
happens, aside that the swirling in the lens is replaced for a brief moment
by broken lines radiating from its centre";
}
;
entering, for example, x black or x black stone, all work as designed, but if I imput x multiple buttons, e.g. x black, red, cyan, brown the nil object reference showstopper raise its ugly head.
After an entire morning fighting this, I must ask to the fellow TADS & a3Lite coders suggestion on tackling this issue.
(of course, I can easily code as twelve single button object (after all, four or five are active…) but i feel that is a wastage of resources)
TIA and
Best regards from Italy,
dott. Piergiorgio.
ps. and EDIT: yes, this also show why I feel that FEEL and TOUCH ought to be separate…