Game command problem (SOLVED)

I want to create a game command for the verb 'shout' that returns a printed message in one location, and a different one in all other locations.

So I went to game, made new command, command expression, shout and then set If conditional on room player is in. But it returns the same response even when the player is in the special location?

In code view (which I don't use) it looks like:

if (not game.pov.parent = Windmill) {
msg ("outside windmill response")
}
else if (game.pov.parent = Windmill) {
msg ("inside windmill response")
}


Code looks like it should work fine. Is there something else called Windmill maybe?

An alternative approach is to have a SHOUT command for the room. When in the Windmill, this would apply. Otherwise the global SHOUT command would apply.


as Pixie said, the code itself that you presented is perfect/fine, so the problem lies maybe with your Objects (make sure you're naming them correctly: no spelling/typos, the names must match up exactly too: upper/lower case matters. Is 'Windmill' the 'name' of the Object or the 'alias' of the Object?), or possibly, do you have multiple 'shout' Commands?

Also, which response is it always outputing ??? (the inside windmill or outside the windmill response?)


Thanks both, yes I had another Windmill ( a scenery item in the room 'outside the windmill'. fixed now).


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums