input enhancement

Pertex
24 Nov 2011, 12:52I found some nice features in an ifgame:
if you just press return in the commandline without a command, it shows the roomdescription
and if you insert only the name of an object, it displays the look-attribute of this object.
I think its not possible to do something like this in the editor, so perhaps you could add it to Q5 as a standardfeature?
if you just press return in the commandline without a command, it shows the roomdescription
and if you insert only the name of an object, it displays the look-attribute of this object.
I think its not possible to do something like this in the editor, so perhaps you could add it to Q5 as a standardfeature?

Pertex
24 Nov 2011, 13:47I think the second thing can be done in CoreParser.aslx in function HandleSingleCommand:
Hmmm, there iss a command in Q4 something like "execute string as player typed". Is there a command in Q5 doing the same?
...
if (thiscommand = null) {
found=false
object=GetObject (command )
if (object <> null ){
foreach (visibleobject, ScopeVisible()) {
if (object=visibleobject) {
HandleCommand ("look at " + object.name)
found=true
}
}
}
if (found=false){
msg (Template("UnrecognisedCommand"))
}
}
Hmmm, there iss a command in Q4 something like "execute string as player typed". Is there a command in Q5 doing the same?
Alex
24 Nov 2011, 14:06There was something similar in Q5 for a while, the "look at" regex had included "(?<object>.*)" which would match any object in the current scope.
I can't remember why I removed it now...
Your suggested change to CoreParser is another way of doing this, and arguably better.
In Q5 there is no equivalent of "exec" in Q4 (which was "Execute a command as if it were typed by the player"). It shouldn't be necessary now, as you can call all internal functionality (doing a "look at", "take" etc.) by calling the relevant function (DoTake etc.) within Core.aslx (in Q4 there was often no way of directly calling internal behaviour).
But if you really need an equivalent you could just call the HandleCommand function.
I can't remember why I removed it now...
Your suggested change to CoreParser is another way of doing this, and arguably better.
In Q5 there is no equivalent of "exec" in Q4 (which was "Execute a command as if it were typed by the player"). It shouldn't be necessary now, as you can call all internal functionality (doing a "look at", "take" etc.) by calling the relevant function (DoTake etc.) within Core.aslx (in Q4 there was often no way of directly calling internal behaviour).
But if you really need an equivalent you could just call the HandleCommand function.