Jump to content

move_to_new_town


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...