Easygoing Eyebeast Xaiya Posted September 5, 2008 Share Posted September 5, 2008 ...and in order to do it, I need to fix some things which I can't figure out the problem. This one says something about unmatched parenthesis, yet I've looked. Code: beginstate 15; reset_dialog(); add_dialog_str(0,"There is a lever here, do you want to use it?",0); add_dialog_choice(0,"No."); add_dialog_choice(1,"Use lever."); choice = run_dialog(1); if ((get_flag(4,12) == 0) && (choice = 2)){ print_str_color("You hear chains rattling around you.",3); set_terrain(11,9,375); set_flag(4,12,1); } if ((get_flag(4,12) == 1) && (choice = 2)){ print_str("Nothing happens."); } break; I just can't get teleportation to work right...the sound and the boom don't go at the same time. Code: put_boom_on_char(10,2,0); play_sound(10); run_animation(); pause(5); erase_char(10); force_instant_terrain_redraw(); activate_hidden_group(1); put_boom_on_char(17,2,0); play_sound(10); run_animation(); pause(5); Here is plays the teleporting sound, but it doesn't move the party to a new town. Yes, it is in the START_STATE. Code: if ((get_flag(4,15) == 4) && (get_current_tick() == 17015)){ pause(8); play_sound(10); move_to_new_town(16,16,6); } I'm sorry that I keep having to ask for help so many times, but I'm the oblivious kind of person and I haven't completely grasped the engine so I have trouble finding my errors. (I might have more for this thread, by the way.) (Copy and paste makes things look a bit weird, by the way.) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 5, 2008 Share Posted September 5, 2008 For the first one, as shown it's shown in the post, Alint doesn't like that the string span more than one line. Also, in one of your if conditions, you have 'choice = 2' which ought to be 'choice == 2', to do a test rather than an assignment. For the second; try using run_animation_sound() instead of two separate calls. For the third, is this code in a town script state that gets called when the party steps into blue rectangle? Unfortunately this is the only way to use move_to_new_town(). Don't worry about asking for help; I for one certainly don't mind answering, and I doubt anyone else does either. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted September 5, 2008 Share Posted September 5, 2008 Originally Posted By: Niemand For the third, is this code in a town script state that gets called when the party steps into blue rectangle? Unfortunately this is the only way to use move_to_new_town(). Which is kind of stupid, really... Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted September 5, 2008 Share Posted September 5, 2008 Yes, but the reasons, from what I hear, are a bit more sensible than this appears on the surface; namely that switching towns is unlike most other script operations in that it involves loading and unloading game data in memory, in particular the town script itself. I can easily imagine how this might be a non-trivial problem if the engine design fell out in certain ways, particularly if such a capability was not a design goal from the start. Note that there is also some restriction on the use of change_outdoor_location(), I think we just don't use that call as much so we notice it less. (Also, curiously, as phrased by the documentation the restriction on this second call does appear a little less stringent, but that may be just an inaccuracy.) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted September 6, 2008 Share Posted September 6, 2008 From what I can see, it can't be used to boot a party from town. It seems that it works only from a blue rectangle. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted September 6, 2008 Share Posted September 6, 2008 Yes, and we know, it has been established several times already, before and during the existence of this thread. Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted September 7, 2008 Share Posted September 7, 2008 relocate_char can be used to boot party from town. Again only from a special rectangle. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted September 7, 2008 Share Posted September 7, 2008 Do you relocate them to -1,-1 or another set of coordinates? Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted September 7, 2008 Share Posted September 7, 2008 You relocate them to outside the town's boundaries. 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.