Axe Software Forums
  Quest Developer Forum
  Functions and properties


Author Topic:   Functions and properties
babydragon posted 20-11-2001 05:46 GMT     
I'm still not getting functions and properties. Say I want a dragon to start with 15 life points. How do I script this? Examples welcome!
Thanx!
Computer Whizz posted 20-11-2001 15:52 GMT          
Well, functions are usually pieces of code which are meant to return a result back into the program..... Ie. You have a set of sums that is meant to calculate your salery or mortgage, then you might put these into a function and have it run when you enter a command with a number.....
Or in Quest's case you could do it to calculate HP or opponantes responses, ect..

Properties are the certain aspects that an object can have. Ie. An apple (in real life) has the properties; Colour=Red, Sweet, Crisp and Bruise's=0. Now, when you INSPECT the apple you might come up with "Red in colour, doesn't appear to have any bruise's, and feels pretty crisp!" then you bite it and come up with the other info.

Now these properties can hold HP, MP, and anything about the object you want!

If you want some examples you'll have to wait until I get home tonight (meant to be doing my coursework right now!!)....
But MaDbRiT might give you some cut&paste code ;)

Computer Whizz

babydragon posted 20-11-2001 19:22 GMT          
Yeah, I think I get the basic concept all right. I just need some examples of how it looks to get me started. I just can't seem to make it work in scripting or in QDK.
Thanx for the help!!