So you guys know the thing where the last error is the player’s command and you can make all sorts of fun and silly error messages?
How do I do that with nouns?
now the LAST-INSPECTED-CLUE is the NOUN;
or something to that effect.
Thanks in advance (I have this much trust in you people)!
I’m somewhat confused by what you’re asking. But you can access the noun at any point, it’s a global variable. So “after doing anything: now the noun is used” or whatever would work.
Well i mean, i want to be able to use [LAST-INSPECTED-CLUE] to reference the name of the noun that was last relevant.
so i could inspect a knife, a desk, a shoe, in that order, and since the only relevant one was the knife, [LAST-INSPECTED-CLUE] would result in “knife”.
And if i inspect a knife, a desk, a shoe, corpse, gun, waffle iron, giraffe, pantyhose, in that order, [LAST-INSPECTED-CLUE] would result in “gun” (unless I decide I really, really hate giraffes).
So make a variable, and whenever the player does something “relevant” (which depends on your other code for your game) set it to the noun or whatever.
but ‘how’ ? i’m trying it like the last error thing but i don’t need the whole command, just the noun.
for example, i just want “cigar” and not “examine cigar”
Right. So set the variable to the noun rather than the player’s command.
I’m not giving you the right information.
HOW do i do it? Because this is what I get so far:
now the LASTCLUE is "[the noun]";
doesn’t work either because it gives you the last noun used, which isn’t the last relevant clue.
You defined LASTCLUE as a text variable, but the noun is an object, not some text. Make it “an object that varies”.
oh sweet. that works. ^^ thanks!