Axe Software Forums
  Quest Developer Forum
  properties


Author Topic:   properties
sweetguy posted 16-10-2001 22:04 GMT     
how do i check a properties in a object i have it set like this:
define object <David>
properties <str=10>
properties <addable=notaddable>
look property <david;addable=notaddable>
speak property <david;addable=addable>
gender <he>
talk
end define

then i have it set like this:
if property <david;addable=addable> then do <move down Proc>
else msg <he can't be added>

i'm almost done with my game i just need to make the land and the finish the battle system (which i have been takeing my sweet time on i spend like an hour every 2 o r 3 week on sometime less)i hopeing i can spend some more time on it with school beening out for 3 weeks =).

Computer Whizz posted 16-10-2001 23:36 GMT          
Well, MaDbRiT will probably post an example (LOL) and correct me on some erroneous syntax - but I think it's something along the lines of:

if ($property(david;addable)$ = addable) then....

But that IS a rather clunky way to do it!
What you should do is get rid of the addable= and set the property to either "addable" or "not addable". Quest sort's this out fine, and you can theck it using:
if property <david; addable> then...

now, MaDbRiT is going to step in and explain it a little better, showing many better examples and giving a ready-made, cut&paste file!
;)

Computer Whizz

sweetguy posted 17-10-2001 01:16 GMT          
yeah i can do it like that the prob is i can't change the pro. from addable to not addable. i was trying
property <david;addable=not addable>
but it don't work i know i just using it wrong but i can't figure it out.
Tyrant posted 17-10-2001 01:21 GMT          
This isn't really an answer to your question, but I'd like to comment on your devotion to your battle system, so I'm definately looking forward to it. I once had 20KB of pure battle system coding that was up to par with video game console RPGs... but DAMN BIN LADEN I LOST IT!! Anyway, hopefully I can create a new, less complicated battle system with the new Quest.

On a side note to anyone who may reply after this, how do you do smilies in your posts?

sweetguy posted 17-10-2001 07:13 GMT          
lol. that sucks mine is not very comp. well to me. it just the pep. you gona face is gona be comp. like i have a list of 1 to a hundred of pep. you can face. in a certain area there are certain list num.s that can be called off for dif. monsters on the list, and the level you are at make how hard it is to beat them. but there is a cap on each person you have to beat. they can all come back a million times and you can face mutiples and a rare fight once in a while. that's why it takeing so long to prog. i got it all on paper and in my head. one of the hardest things for me is the prop. thing after that it's really easy.
MaDbRiT posted 17-10-2001 08:20 GMT          
C.W. Wrote:

quote:

What you should do is get rid of the addable= and set the property to either "addable" or "not addable". Quest sort's this out fine, and you can theck it using:
if property <david; addable> then...

now, MaDbRiT is going to step in and explain it a little better, showing many better examples and giving a ready-made, cut&paste file!


I agree with you C.W. - a straight forward '[not] addable' is the way to go on this one, it is defintely a boolean thing.

Just to prove you wrong, I'll not post a ready made "cut n' paste" solution this time... :-)

( actually I don't have the time to write one at the moment )

Al

Computer Whizz posted 17-10-2001 19:04 GMT          
quote:

Just to prove you wrong, I'll not post a ready made "cut n' paste" solution this time... :-)

LOL....

SG - I don't think you understand me properly. What I mean is that you should stop using the property "addable=addable" and start using "addable" and "not addable".
Here's the code YOU pasted, but subjected to MY (OMG!!!) re-writing.

define object <David>
properties <str=10; addable>
look {
property <david; not addable>
msg <David look's ---- like DAVID!!>}
speak {
property <david; addable>
msg <David say's "Hello!">}
gender <he>
talk
end define

if property <david; addable> then do <move down Proc> else msg <Sorry - get the code right, then he can enter your group!>

That should work, just replace these bit's in place of your previous code.... I HOPE!!

Computer Whizz

sweetguy posted 17-10-2001 20:23 GMT          
=) be nice if it worked that way, huh?? well i did that but now david has the prop. addable AND notaddable so then ummmmmm i'm stuck. of course i could do it really easy (how i have it right now) and set a var

set string <Adavid;yes>

but i want to be able to do it in the prop. so it won't be so confusing when i start adding all the players and other pep.

so how would i go about changeing addable to not addable AND removing OR replacing the addable. that's my big prob.

Alex posted 17-10-2001 21:05 GMT          
If you've got a property called "notaddable" it sounds like you've missed out a space somewhere! Make sure you really have got "not addable" in your code and not "notaddable".
Computer Whizz posted 17-10-2001 23:12 GMT          
Yes, like Alex said, make sure you have "not addable" and not "notaddable". Also make sure you don't mispell "addable" and put "not adable" because it'll put in a WHOLE new property :)

Talking about properties, can we put them across multiple lines? eg:
properties <blah, blah, blah __
blah, blah, blah __
blah, and OMG BLAH!>

It would certainly be easier to read if you wanted to have conditions where things change relating to the character (ie. look changes if you beat him up, or stab him, ect..).

Computer Whizz

Alex posted 17-10-2001 23:56 GMT          
Of course you can. And you can use only one underscore if you want. e.g.

define object <Alex>
look <What a fine man.>
speak <You're too scared to talk.>
properties <great; _
sexy; wonderful; _
amazing; brilliant; _
age=19; _
gender=male; _
IQ=trillions>
end define

sweetguy posted 18-10-2001 01:26 GMT          
WoW! how did you do that! i been trying that for the longest but i couldn't do it i was doing the exact same thing. ????? that's weird i tryed the
prop. <david;addable>
speck prop. <david;not addable>
but that never worked for me i wonder what i was doing wrong.

thanks anyways i should be done with my game in a few more weeks if time allows. thanks =)