Change_screen_return is gay {WB}

正在查看此主题的用户

Im having a major problem with the following. The short is that I am trying to make it so that NPCs have their own party. I am doing this through Dialog, and I want to make it so that the party needs atleast 10 troops. I have made the script, but now it is just being gay. At the "close_window" command it just pulls up the exchange troops with party screen. When I then close it it takes me to the last peice of dialog i was on, then back to the party screen, then back to the dialog.
HELP!
插入代码块:
  [anyone,"member_quest_party_test", [(party_get_num_companions,":companions", "$g_new_party"),
                                      (ge, ":companions", 10),
                                      (troop_set_slot, "$g_talk_troop", slot_troop_companion_state, state_party),
                                      (str_store_troop_name, s1, "$g_talk_troop"),
                                      (str_store_string, s2, "@{s1}'s party"),
                                      (party_set_name, "$g_new_party", s2),
                                      (change_screen_map)], "Alright, everything looks in order here. I shall follow you on your journey.", "close_window",[]],
  [anyone,"member_quest_party_test", [], "I'm sorry sir, but I will need more troops than that.", "member_quest_party_test_confirm",[]],
  [anyone|plyr,"member_quest_party_test_confirm", [], "Sure, here, take these as well...", "member_quest_party_test",[(change_screen_exchange_members, 0, "$g_new_party"),]],
  [anyone|plyr,"member_quest_party_test_confirm", [], "You know what, never mind.", "member_pretalk",[(party_get_num_companion_stacks, ":stacks", "$g_new_party"),
                                                                                                         (val_add, ":stacks", 1),
                                                                                                         (try_for_range, ":stack", 0, ":stacks"),
                                                                                                            (party_stack_get_troop_id, ":troop", "$g_new_party", ":stack"),
                                                                                                            (party_stack_get_size, ":no_troops", "$g_new_party", ":stack"),
                                                                                                            (party_add_members, "p_main_party", ":troop", ":no_troops"),
                                                                                                         (try_end),
                                                                                                         (remove_party, "$g_new_party"),]],
  [anyone,"member_quest_party", [], "I'm sorry but no. I can't accept your offer.", "member_pretalk",[]],
 
Is that all the relevant code? There could be something wrong with the way you've set up the exchange. If the encounter is set up, include (assign, "$g_leave_encounter", 1), before the last dialog if it helps. Have you considered putting change_screen_map in the consequence, or create a branching dialog?
Have you verified and reset the value of $g_new_party? You might also want to use (str_store_string, s0, "$g_talk_troop"), (party_set_name, "$g_new_party", "str_s0s_party") in the condition of the first dialog, and (assign, "$g_move_heroes", 1),(call_script, "script_party_add_party_companions", "p_main_party", "$g_new_party"),(remove_party, "$g_new_party"), (assign, "$g_new_party", -1), when disbanding. For future reference, note that (party_get_num_companion_stacks) gives the appropriate upper bound, so there's no need to increment it by one.
 
Though it is doubtful I can add to the assistance Somebody has given, the biggest problems I see here are three fold:

1) Unnecessary homophobic thread title is unnecessary.
2) Scripts are incapable of having sexual orientations, and if they were, who is to say if they would be attracted to other scripts or not? Perhaps a faction declaration is more their style. But, if so, no skin off my back.

3) Oh, and as to the code, I'm fairly certain that (change_screen_map) doesn't belong in the conditions block.
and that (assign, "$g_leave_encounter", 1), should probably go into the consequence block of the option that goes to "close_window"
 
后退
顶部 底部