Jump to content

Doesn't Recognize States

Recommended Posts

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).


// 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 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



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.)




Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...