jaynabonne wrote:Or you modify HandleCommand (copy it to your game and change it) to not split on periods...
The Pixie wrote:"jaynabonne"
Or you modify HandleCommand (copy it to your game and change it) to not split on periods...
I would say this was a good idea anyway. Does anyone use a full stop to concatenate commands when playing games? All it is good for is cheating the turn counter, as it lets the player do multiple actions in a single turn.
jaynabonne wrote:The problem (and this is potentially a big one) is that, as far as I know, turn scripts execute after each *line* is processed, not each individual command. So if you had (for example) a chase game where the monster advances toward the player using a turn script, then the player could speed ahead by executing multiple commands in a single turn. To me, it's a big issue, even if your usage is more mundane than monsters.
Yes.
Or it could be an option on the game object.
jaynabonne wrote:You could change it to have a "connect" command that then prompts for the IP, using "get input" to read it. It's a bit more clunky, but it works around this "feature" of the parser. Or you modify HandleCommand (copy it to your game and change it) to not split on periods...
HK wrote:Alex has done a great job, it's impossible to alter~delete the quest engine core code (underlying~default~built-in code) through the GUI~Editor. (though, if you open up the actual quest's program folders and library files, and alter~delete them, then yes you can mess up quest).
What the GUI~Editor does, is to force you to click on the 'COPY' button (after you highlight something on the left side's 'tree of stuff', on the right side in the upper right corner, will be the 'copy' button), when you want to alter it's default~underlying~built-in code (such as the 'take' verb, for example). This creates a copy for you to alter it as you want, leaving~protecting the original code from your altering of it.
-------
By the way, to see all of the underlying~default~built-in code~stuff, in the GUI~Editor:
on the left side ( in the 'tree of stuff' ), at the bottom (lower left corner of computer monitor~screen), is:
Filter -> ~Show Library Files (this is a bit tricky to click on due to its popup getting in the way, argh)
you want to click on this (filter and then its 'show library files' or whatever it is called).
what this does is a toggle button, showing (or hiding) all the default~underlying~built-in code stuff as light greyed text in the left side's 'tree of stuff'
handled = false
if (game.menucallback <> null) {
if (HandleMenuTextResponse(command)) {
handled = true
}
else {
if (game.menuallowcancel) {
ClearMenu
}
else {
handled = true
}
}
}
if (not handled) {
StartTurnOutputSection
if (StartsWith (command, "*")) {
msg ("")
msg (SafeXML (command))
}
else {
shownlink = false
if (game.echocommand) {
if (metadata <> null and game.enablehyperlinks and game.echohyperlinks) {
foreach (key, metadata) {
if (EndsWith(command, key)) { <<<<
objectname = StringDictionaryItem(metadata, key)
object = GetObject(objectname)
if (object <> null) {
msg ("")
msg ("> " + Left(command, LengthOf(command) - LengthOf(key)) + "{object:" + object.name + "}")
shownlink = true
}
}
}
}
if (not shownlink) {
msg ("")
OutputTextRaw ("> " + SafeXML(command))
}
}
if (game.command_newline) {
msg ("")
}
commands = Split(command, ".")
game.pov.commandmetadata = metadata
if (ListCount(commands) = 1) {
game.pov.commandqueue = null
HandleSingleCommand (Trim(command))
}
else {
game.pov.commandqueue = commands
HandleNextCommandQueueItem
}
}
}
mrfryz wrote:By doing this, it will allow the player to type "connect 123.456.7.89" and the ip to be saved in the #text# string right?
Pertex wrote:"jaynabonne"
The problem (and this is potentially a big one) is that, as far as I know, turn scripts execute after each *line* is processed, not each individual command. So if you had (for example) a chase game where the monster advances toward the player using a turn script, then the player could speed ahead by executing multiple commands in a single turn. To me, it's a big issue, even if your usage is more mundane than monsters.
So do you think the possibility of entering several commands in one line sould be removed?
commands = Split(command, ".")
commands = NewList()
list add(commands, command)
<command>
<pattern>connect</pattern>
<script>
msg ("Enter the IP to connect to ")
get input {
ip_address = result
// do something with it
}
</script>
</command>
HegemonKhan wrote:the code line resources used to be (not that long ago) on a wiki, which had a very convenient 'All code functions and scripts and etc' page, but this doesn't seem to have been or have been able to be transfered to the new webpages location: docs (google docs?). I really miss that page, as it was my 'Quest Coding Bible' resource page