Jump to content

I'm oblivious, but I still need to get this scenario done...


Xaiya

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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