More detailed docs?

I was curious to see if I could hook an event to the point when the player selects one of the exits...and yay I found it!

Then it took me a while searching this forum to figure out how to do it.

Now, if someone else knows how to do it it means one of two things!

  1. Either they wrote the source code.
  2. There is some extensive docs somewhere
    or maybe...
  3. Source code is actually easy to read.

For example, what should I do if I encounter this situation again and I need to find more info about scripts such as onexit, like what would this refer to, who do the parameters do in the buit-in internal functions and so on..

PS. I still haven't figured out on-exit! How do I make it "blocking"? What I want to do is to perform a certain check and if the check fails inform the player that they failed to exit and basically prevent the exiting. I guess I could just trick this thing into the needed behavior somehow with other scripts, but anyway some docs on these functions would really help!

PPS. It would be great if there was a build in search option in http://docs.textadventures.co.uk/quest ! I use google's "site:http://docs.textadventures.co.uk/quest onexit" command whenever I need to do something, but it's not very comfortable and not everyone will figure it out..


K.V.

http://docs.textadventures.co.uk/quest/attributes.html

http://docs.textadventures.co.uk/quest/attributes/onexit.html


You can set up a script on the exit.

This one just moves the player through the exit, but you could add whatever you like to the script:
image


Example

If you had a Boolean attribute named "readytoleave" set on the player object, you could do this:

if(not game.pov.readytoleave){
  msg("You can''t leave yet.  There is something you must do first!")
}
else{
  MoveObject(game.pov,this.to)
}

There's a search on the main documents page, too (but it works just like your method):

http://docs.textadventures.co.uk/quest/#Search


Oh thanks, I didn't notice the search field at the bottom! Still faster than what I was doing before!


K.V.

Yeah... I didn't see that at first, either.

I didn't see it all, in fact.

I made a post very similar to this one about a month ago, and everyone pointed that search field out to me. (Ha-ha!)

Happy gaming!


When took over Quest nearly a year ago, updating the docs was one of the things I wanted to do. It is happening, but slowly. This is something that has not come up on the forums before and I have not had an issue with, so has not been addressed yet. I am not too sure where I would add it, to be honest...

The onexit script is attached to a room, and fire when you leave the room. Moving the player in any of the the room scripts is a bad idea, because Quest is already part way through the move when they fire, and it gets messy. As KV says, it is better to block the player on the exits.


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

Support

Forums