Items on locations
Author | Topic: Items on locations |
---|---|
Master
Member # 5977
|
written Friday, April 6 2007 01:26
Profile
Homepage
I have a puzzle in which has to be hecked whether or not a certain item is on a certain spot. However, it fails to work correctly. The relevant bit of code is here: The first if-call checks for a slith spear, the second one for a greatsword. Can enybody see what is wrong in this script that it might not work? If somebod knows a better way to do the same, I would very appreciate it if he told me how to, as this call does actually not do exactly what I want it to do. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
Infiltrator
Member # 5576
|
written Friday, April 6 2007 03:48
Profile
Homepage
The item_of_class_on_spot() call only checks for items of that special class, set by it_special_class. Did you redefine the greatsword and slith spear so that this property is set to 2 and 1 respectively on these items? -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Master
Member # 5977
|
written Friday, April 6 2007 04:31
Profile
Homepage
Woops, I didn't know that was necessary. I'll do it right away. Thanks! EDIT: Hmmm, still doesn't seem to work right. I probably did something wrong: datascript: townscript: I put a print_num(num) call at the first if-call of the START_STATE, to see if it's triggered at all, and it's not. I think everything is right now, yet it doesn't work. What can be the problem now? Yes, I did put the right items in the town (445 and 446). [ Friday, April 06, 2007 05:01: Message edited by: Thralni ] -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
Lifecrafter
Member # 6193
|
written Friday, April 6 2007 06:19
Profile
Homepage
Remove the flag checks and put a print_str() in each of the item checks, just to see what the problem is. It looks like it should work, perhaps the flags are just messed up. -------------------- Guaranteed to blow your mind. Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Law Bringer
Member # 4153
|
written Friday, April 6 2007 07:02
Profile
Homepage
quote:I bet this is it. Try it out with a fresh party, or manually reset the flag via character editor for whatever save you're using for testing. (It really helps to search your other scripts for places where you might've accidentally set one of those flags. That's happened to me a few times now.) -------------------- Gamble with Gaea, and she eats your dice. I hate undead. I really, really, really, really hate undead. With a passion. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Master
Member # 5977
|
written Friday, April 6 2007 11:05
Profile
Homepage
Okay, I'll try that. I, too, thought it might be the flags, although I really doubt it. I will do that sometime tomorrow, as the party of last night, the beer I drank and the last night sleep, plus the 5 hours of orchstra repetition have basically killed me. Anyway, thanks. EDIT: Just couldn't leave it alone, could I. Once I get obsessed with such things like these, i keep going until it works, and now it does. I still don't quite understand what the problem was, though. I took out the flags, and checked to what the flags were set, which were set correctly. Then I put in the flag checks, and it still worked. Then I took out the flags' checks of print_num() and it still works. Thanks for all the help guys, you made me a very happy man. [ Friday, April 06, 2007 11:54: Message edited by: Thralni ] -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |