HegemonKhan wrote:...
actually... maybe you don't even need the activator word (I haven't worked that fully with testing~studying Commands, lol).... which would then make it really easy to do a single Command:
Command Name: teleport_command
Command Pattern: #object#
Command Script: MoveObject (player, object.name)
I should test this, if it works, lol...
if (object = null) {
foreach (obj, AllObjects ()) {
if (obj.name = ToString (object)) {
MoveObject (player, object.name)
} else {
if (obj.alias = ToString (object)) {
MoveObject (player, object.name)
}
}
}
} else {
MoveObject (player, object.name)
}samplecommand.parent = null
Pixie and Jay wrote:~ "you can use #object#"
if (object = null) {
foreach (obj, AllObjects ()) {
if (obj.name = ToString (object)) {
MoveObject (player, object.name)
} else {
if (obj.alias = ToString (object)) {
MoveObject (player, object.name)
}
}
}
} else {
MoveObject (player, object.name)
}they'd need lots of checks~validations, but I didn't want to confuse them with that stuff.
jaynabonne wrote:And again, the problem with #text# isn't the validation. The problem is that it will suck up all invalid input, making some commands return incorrect error messages, unless you re-parse the entire input again to find out what should have happened. For example, if you're in a room without a north exit, and you type 'n', and you have a command that is only #text#, then it will execute your command when you type 'n'. So instead of printing out "You can't go that way", it will print out whatever error you have in your command, which probably won't make as much sense.
I would suggest trying it out - you'll see all sorts of behavior that you'd have to try to compensate for. Definitely not worth the effort for such a small gain!
#text# definitely works better with an activator word, to limit its effect.
jaynabonne wrote:In my test, it didn't do that. (I had a similar fear.) I'm not totally sure why, to be honest.
I agree that room-specific commands take precedence, but I'm not sure if Quest can know the difference between the standard commands and the ones you create. I think they all look the same (one just happens to live in the core file). So maybe it just finds the standard one first by chance.
But then, Quest keeps evolving, and I don't always keep up, so I might be wrong about that.