destroy_char_item only destroys equipped items?
Author | Topic: destroy_char_item only destroys equipped items? |
---|---|
Warrior
Member # 4202
|
written Saturday, April 10 2004 06:14
Profile
Homepage
I wouldn't do this in a normal scenario, but here's my troublesome code. It's supposed to destroy all of the party's items, equipped or in their pack. It seems to only destroy equipped items. -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
Shock Trooper
Member # 4180
|
written Saturday, April 10 2004 11:20
Profile
Total shot in the dark here, but could it be choking on empty slots? I'd try putting a check to make sure there's something in the slot in front of the destroy_char_item() call, to see if that helps. If not, it definitely seems like a bug in either the implementation or documentation of the call... -spyderbytes EDIT: Left out a word. :o [ Saturday, April 10, 2004 11:21: Message edited by: spyderbytes ] -------------------- -spyderbytes Posts: 200 | Registered: Wednesday, March 31 2004 08:00 |
Warrior
Member # 4202
|
written Saturday, April 10 2004 12:47
Profile
Homepage
I tried putting in a check for that, but it still doesn't work: -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
Board Administrator
Member # 1
|
written Monday, April 12 2004 13:01
Profile
Homepage
When you remove an item in a pack, all items above it shift down. So if you destroy item 18, say, item 19 shifts down into 18's spot. - Jeff -------------------- Official Board Admin spidweb@spiderwebsoftware.com Posts: 960 | Registered: Tuesday, September 18 2001 07:00 |
...b10010b...
Member # 869
|
written Monday, April 12 2004 17:30
Profile
Homepage
Ah, of course. The first pack slot is #13, right? So all the script has to do is destroy all equipped items, then repeatedly check if there's an item in slot 13 and destroy it. [ Monday, April 12, 2004 17:31: Message edited by: Thuryl ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |