help with quest making

正在查看此主题的用户

asierus

Regular
hello, i hope someone can help me with a problem i got while making a quest.

i have all dialogs  and the quest done and working, i even can get the quest complete , but i cannot get to work the part were you can fail it.

im using modulesys

this is the part of the dialog code where the action start:

[trp_wo_Rebel2,"start", [(eq,"$wo_recruiter2_duel",1)], "See you outside tonight, we will see who is best suited to be The Inquisitor..!.", "close_window",[(assign,"$wo_recruiter2_duel",3),(remove_troop_from_site,"trp_wo_Rebel2","scn_castle_49_interior")]],    <---- this activates $wo_recruiter2_duel",3 which sets of a trigger to spawn a party and deletes the bad guy from the scene where you find him.

then when you get out and wait some hours until night ( this is made by trigger) he and his friends spawn and attack the player

and on encounter this dialog occur:

[party_tpl|pt_white_order_rebels|auto_proceed,"start", [(eq,"$wo_recruiter2_duel",3,tc_party_encounter),(encountered_party_is_attacker),],"You! Come here we have things to discuss idiot!.", "close_window",[(assign,"$wo_recruiter2_duel",4)]],  <---- this sets (assign,"$wo_recruiter2_duel",4)l which is a temporary condition to end the quest via dialog with other npc and starts the battle with that party.

all this work fine, but i want to make that depending if you win or loose the battle with that  party you get (assign,"$wo_recruiter2_duel",4) if you win to be able to complete the quest  or (assign,"$wo_recruiter2_duel",5) to fail it.

i even have a trigger rdy to start when $wo_recruiter2_duel",5 is set that removes the enemy party after you has been released prisoner giving you only 1 chance of defeating him. only need to set the win/loose part which i cant find anywhere :sad:

and even better if someone can tell me too if i can make that party not allowed to take player prisoner.


can even be done¿
if yes how i can do it?

thanks in advance  :smile:
 
asierus 说:
can even be done¿
if yes how i can do it?

first: visit Q&A thread for quick questions. Creating a new thread makes it less likely you will get a answer.

you can use events (triggers) on your mission template (scene) to capture the win/lose scenario, and use them to set your global variable.

check header_triggers.py for the list of events. And module_mission_templates.py for examples

插入代码块:
common_battle_tab_press = (
  ti_tab_pressed, 0, 0, [],
  [
    (try_begin),
      (eq, "$g_battle_won", 1),
      (call_script, "script_count_mission_casualties_from_agents"),
      (finish_mission,0),
    (else_try),
      (call_script, "script_cf_check_enemies_nearby"),
      (question_box,"str_do_you_want_to_retreat"),
    (else_try),
      (display_message,"str_can_not_retreat"),
    (try_end),
    ])
this is a usual condition that control when you can retreat. You will use events and code like that to control your scenario. If in doubt about triggers see tutorial section.
 
后退
顶部 底部