Game command problem (SOLVED)

NecroDeath
22 Jan 2017, 17:34

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")
}


The Pixie
22 Jan 2017, 20:03

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.


hegemonkhan
22 Jan 2017, 21:21

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?)


NecroDeath
24 Jan 2017, 14:57

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