Water Exchange Code Check
Author | Topic: Water Exchange Code Check |
---|---|
Warrior
Member # 1250
|
written Sunday, February 13 2005 18:05
Profile
Working on getting a dialog choice to work. I understand the format now that I rooted around in the scripts from... I think it was VoDT. But I have a condition to start my dialog choice, and I think that something there is stopping the condition that regulates the actions from the choice from working... Could also be the fact that I try to equate the number of special item 1 (empty waterskins) to the variable empty_skins, so I can carry the variable over for the number of special item 2 (full waterskins) to be added. Pick it apart, if you would. :-) [ Sunday, February 13, 2005 18:06: Message edited by: Guardian of Eternity ] Posts: 93 | Registered: Saturday, June 1 2002 07:00 |
...b10010b...
Member # 869
|
written Sunday, February 13 2005 18:13
Profile
Homepage
has_special_item(1) == empty_skins; should beempty_skins = has_special_item(1); Don't feel too bad. Mixing up = with == is probably the single most common error in C programming.[ Sunday, February 13, 2005 18:14: Message edited by: Sagieuleaux ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Off With Their Heads
Member # 4045
|
written Sunday, February 13 2005 18:14
Profile
Homepage
Two things: empty_skins == 0; This doesn't work. You need only one equals sign ("empty_skins = 0;"). has_special_item(1) == empty_skins; This doesn't work for two reasons, one of which is described above. The other is that you can't set a short the way you can set a variable. Use an SDF or another variable to hold this value if you need to hold it. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
...b10010b...
Member # 869
|
written Sunday, February 13 2005 18:16
Profile
Homepage
I'm pretty sure he was trying to set the variable, not the short, but put them the wrong way round. EDIT: Come to think of it, there should probably be a line in there somewhere to remove the empty skin special items, or it's possible to continue getting full skins indefinitely. Also, there's one more problem with your script that comes from BoA's terminally brain-damaged handling of the run_dialog call. Choice number zero returns 1, choice number one returns 2, and so on. A modified script with all suggested corrections implemented is below. [ Sunday, February 13, 2005 18:23: Message edited by: Sagieuleaux ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Warrior
Member # 1250
|
written Sunday, February 13 2005 18:34
Profile
Here's what I ended up doing, synthesizing Kelandon and Sagieuleaux's suggestions... Incidentally, my playtesting in Blades now says that I have a missing semicolon... I don't suppose you see where I need one, in there? I don't see it, but I was only working on this section, except for the variables section, where I deleted "empty_skins" in favor of that SDF. EDIT: The missing semicolon might, for some strange reason, be in the "print" statement near the very end, since when I test, it won't print that message. [ Sunday, February 13, 2005 18:41: Message edited by: Guardian of Eternity ] Posts: 93 | Registered: Saturday, June 1 2002 07:00 |
Warrior
Member # 1250
|
written Sunday, February 13 2005 18:44
Profile
All right, all right, this is me committing all sorts of etiquette breaches... I do apologize for the double post, but this is exciting and relevant, for me. I have playtested the empty/full waterskin system. I'm using Dahak & Kelandon's dehydration routine... I've pushed my party to the point where I get damage, before, and now I've made the complete exchange, using the code I posted in this thread. I can now proceed with building the rest of my scenario, having safely navigated this key system! Posts: 93 | Registered: Saturday, June 1 2002 07:00 |
Off With Their Heads
Member # 4045
|
written Sunday, February 13 2005 18:45
Profile
Homepage
set_flag(0,20,0) = 0; This line's no good. Keep it as just set_flag(0,20,0); -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Warrior
Member # 1250
|
written Sunday, February 13 2005 18:59
Profile
My mistake. Fixed it--code works without visible errors, now. Posts: 93 | Registered: Saturday, June 1 2002 07:00 |