![]() |
![]() ![]() ![]() ![]() ![]()
|
Author | Topic: properties |
sweetguy |
![]() 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: 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 |
![]() 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! 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 |
![]() 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 |
![]() 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 |
![]() 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 |
![]() C.W. Wrote:
quote: 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 |
![]() quote: 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". define object <David> 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 |
![]() =) 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 |
![]() 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 |
![]() 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: 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 |
![]() Of course you can. And you can use only one underscore if you want. e.g. define object <Alex> |
sweetguy |
![]() 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 =) |