Using code

Silver
Apart from the one occasion where Jay kindly told me to put some code into an expression script in the UI, I have no idea how to implement the code suggestions given in the forums. I know how to go into code view but surely there's some chronological order to it all and so when someone says "use this code" I have absolutely no idea where to paste it.

george
There are two options. First, when you have a script there's a code view button in the script menu bar. You can type code into that view rather than using the default graphical UI. I suggest clicking on that for any script you have in your game, and you'll see what it looks like in code. Then click it again to switch back.

Second, there's code view for the whole game, which is a similar looking button but in the top menu bar of the whole Desktop app. You also can press F9 on the keyboard. When you type code into that it's much the same as the first way but you need to be aware of the structural elements (the things in angle brackets like <object... ) so that your code goes in the right place.

I guess I should ask, do you use the desktop or web editor?

The Pixie
As long as you follow the rules of XML, there is no "chronological order". Rooms will be listed in the GUI in the order they are in code, but that has zero bearing on how the game plays, and functions, commands and verbs can be scattered throughout. Libraries generally need to go at the top, and I think Quest forces that to happen, and the order they appear is often important.

Silver
george wrote:There are two options. First, when you have a script there's a code view button in the script menu bar. You can type code into that view rather than using the default graphical UI. I suggest clicking on that for any script you have in your game, and you'll see what it looks like in code. Then click it again to switch back.

Second, there's code view for the whole game, which is a similar looking button but in the top menu bar of the whole Desktop app. You also can press F9 on the keyboard. When you type code into that it's much the same as the first way but you need to be aware of the structural elements (the things in angle brackets like <object... ) so that your code goes in the right place.

I guess I should ask, do you use the desktop or web editor?


Ok that makes sense, I think I'd only really noticed the main code view and not the one linked with run script. I use the windows editor.

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

Support

Forums