Easygoing Eyebeast Dintiradan Posted April 14, 2006 Share Posted April 14, 2006 Okay, a little peer editing would be nice before you all point fingers and laugh: I've started scripting, and in one town I can't get the game to run the states when the party enters a special encounter rectangle. In the outdoors, it works fine (DO YOU WISH TO LEAVE?). I've typed up the script just the same as I did for the outdoors, and in just the same way as other scenarios have theirs. The special encounter rectangles look fine in the editor, and I DID put the script name in 'Town Details'. Please tell me what I am doing wrong, before I rip my hair out (below is my script: just ignore the incomplete text stubs for now). Code: // 3: Vahnatai Cavebegintownscript;variables;short choice;body;beginstate INIT_STATE; add_range_to_group(6,24,1);break;beginstate EXIT_STATE; set_flag(3,2,0);break;beginstate START_STATE;break;beginstate 10; if (has_special_item(0) == 0) { message_dialog("YOU GET STONE"); change_spec_item(0,1); }break;beginstate 11; if ((has_special_item(0) != 0) || (get_flag(3,3) == 1)) message_dialog("YOU HAVE STONE OR HAVE BROKEN CRYSTAL"); else { message_dialog("YOU DON'T HAVE STONE"); set_flag(3,2,1); }break;beginstate 12; if (get_flag(3,3) != 1) { reset_dialog(); add_dialog_str(0, "SMASH?", 0); add_dialog_choice(0, "YES"); add_dialog_choice(1, "NO"); choice = run_dialog(1); if (choice == 1) { set_flag(3,3,1); play_sound(-108); swap_terrain(31,6,445,446); } }break; Thanks in advance. -------------------- IF I EVER BECOME AN EVIL OVERLORD: If all the heroes are standing together around a strange device and begin to taunt me, I will pull out a conventional weapon instead of using my unstoppable superweapon on them. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted April 14, 2006 Share Posted April 14, 2006 You don't happen to get a big, red error message at any point when walking around in this town, do you? I notice that your message_dialog calls only have one string each. They need two. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted April 14, 2006 Author Share Posted April 14, 2006 EDIT: ARGHHHHHHHHHH!!!!!!!!! Okay, here's what happened: - I fanatically back up all my work. Normally, I keep my current work in the Data folder, and keep the latest finished version in the Scenario folder. - The first error I noticed was that the town did not have the script listed in Town Details. I changed the copy in the Data folder, but not the one in the Scenario folder. - I tried every single possible combination of calls in the script, not knowing the game had no way to refer to it. Moral of the story: yes, there is a downside to frequently backing up your work. You may all point and laugh now. (By the way, it works now. Even the guardians who heal periodically based on the current state of two SDFs. If anyone wants this creature script, let me know.) -------------------- (Self-facepalm.) Link to comment Share on other sites More sharing options...
Recommended Posts