Writing a script for Quest

There seems to be two parts to Quest, one is clicking on option boxes etc and the other is the written script for a game.
Is it possible to just write a script for Quest with out the need to click on option boxes etc.
One thing I've noticed that is not in the script is when you select to make an object moveable (taken) by the player.


Virtually all of the attributes can be set in script. The only thing you can't always set in script is types/inheritance.

However, it should be noted that objects stored in XML will usually load faster than those created in script, so it's better to save runtime modification to situations where an object's behaviour changes during the game.

An object has an attribute take which determines if it can be taken. When the player tries to take an object, the behaviour will depend on the type of the attribute:

  • A string attribute - display the string and move the object to inventory
  • A script attribute - run the script
  • true - move the object to inventory and display the default "ok" message
  • false- display the default "you can't take it" message

(From memory, so I might have missed an option)


Hi mrangel.
The reason why I asked about the "can take object" flag was that when I took a look at the script from a test adventure I had written using pull down menus to select options then I could not find any code relating to what objects could be taken. I had a bed that could not be taken and a shirt that could be taken.
Maybe not everything is written in the script.


(filler for getting my edited post, updated/posted)


// a 'bed' Object that can NOT be taken:

<object name="bed">

  <attr name="take" type="boolean">false</attr>

</object>

------------

// a 'bed' Object that CAN be taken:

<object name="bed">

  <attr name="take" type="boolean">true</attr>

</object>

-------------------

there's also a short form for 'true' state (the 'bed' Object CAN be taken), which is the default syntax that you'll likely be seeing in the code:

<object name="bed">

  <take />

</object>

however, the 'take' feature/functionality, has a lot of built-in stuff handling it for us, so it's pretty complicated in trying to mess/edit/etc with it on your own...

you can take a look at the built-in code, within the GUI/Editor, via the lower left corner:

Filter -> Show Library Elements -> (toggle it on / check it on)

WARNING: messing with the built-in stuff can wreck your game, though the GUI/Editor forces you to 'copy', so that your quest software/program is safe from being messed up and not having to remove it and re-download and install it again

then, in the "tree of stuff" on the left side, you can see all of the built-in stuff, as the light grey text... but good luck in finding what you need, as it is likely all over the place (multiple areas), for whatever built-in functionality/feature you're trying to mess with and/or handle. Lots of connectedness, so its code is split up all over the place, to handle everything, but it means you got to figure all of that out, if you want to mess/edit with that built-in functionality/feature


Thanks hegemonkhan.
Looks like there is more than just the script file with built-in stuff.
As long as it all gets saved that;s the main thing.


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

Support

Forums