Well-Actually War Trall Ishad Nha Posted January 27, 2013 Share Posted January 27, 2013 In theory town scripts can't be run from scenario scripts. In devising an Identify spell for BoA I found that a scenario script could start a dialog node even if nobody was around. Further, dialog nodes can run town scripts. In the scenario script a usable item calls state 97, this leads to some choices. Choosing one of them leads to this: beginstate 130; if (is_town() == 0) print_str_color("The spell will only work when you are in a town.",1); if (is_town() == 1) { print_str_color("You call upon higher powers.",2); begin_talk_mode(190); } break; In the town dialog script, this occurs at the end: begintalknode 190; state = 100; personality = 38; nextstate = 101; condition = 1; question = "Run this town script."; text1 = "It is done."; code = run_town_script(21); break; I tested this in town 13, Genmar and it worked okay. Blades of Exile Terrain property #12, Call local special, would seem to be possible via the same indirect route. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted January 27, 2013 Share Posted January 27, 2013 It's good to know that this is possible, although it comes with the disadvantage of having to enter dialogue mode, which may look rather odd, depending on why you wanted to invoke a town script state. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted January 28, 2013 Author Share Posted January 28, 2013 If only BoA was open source, this could be fixed! I may be able to fine-tune it a bit. Basically it will look odd, though when you avoid the town script and use it for the Identify spell it is okay. I tried to have the dialog end without the final screen but no luck. Final screen can be blank apart from the Record button and the "1.OK.". In BoE you can specify what monster is called by a summoning item. In BoA the only hope lies in a scenario script starting a dialog node! Even then it won't work in outdoor zones. You seem to need a special script to make the monster non-hostile: "void place_monster(short loc_x,short loc_y,short monst_type,short not_worth_xp) Makes a monster of type monst_type appear at {loc_x,loc_y}. It is hostile to the party." Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.