Rotghroth Rhapsody WiKiSpidweb Posted May 8, 2007 Share Posted May 8, 2007 After using move_to_new_town, what is the easiest way to immediately call a state in the new town being moved to? Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted May 8, 2007 Share Posted May 8, 2007 INIT_STATE does the job pretty well. In fact, it's required for a town script to run. Thus, you put whatever you want in it, and it'll run the instant you enter the town. It works so well, in fact, that it runs before the screen is redrawn, so you may want to use the force_instant_terrain_redraw() call to make it redraw before doing whatever you want to do. EDIT: Or, if you want to call a state other than INIT_STATE, simply put either set_state(#) or set_state_continue(#) into the INIT_STATE. (# being the number of the state.) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 8, 2007 Share Posted May 8, 2007 In a town script, you want to use set_state_continue. In creature scripts you use set_state because the game remembers which state it is running in that script and goes back to that state the next time it runs the script. The game always just calls the START_STATE, so to get another state to run from, say, the INIT_STATE, you have to tell the game to do it immediately. 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.