cwr
Any reason why this doesn't work?
Code:
No errors upon compiling, but just nothing happens in-game.
Code:
I pasted this over the first #Aftermath talks mission template. (There are two, paste it over the one that comes first)
Code:
#Aftermath talks
(3, 0, ti_once,
[
(neg|conversation_screen_is_active),
(eq, "$talk_context", tc_tavern_talk),
(gt, "$g_main_attacker_agent", 0),
(this_or_next|neg|agent_is_alive, "$g_main_attacker_agent"),
(agent_is_wounded, "$g_main_attacker_agent"),
],
[
(mission_enable_talk),
(try_for_agents, ":agent"),
(agent_is_alive, ":agent"),
(agent_get_position, pos4, ":agent"),
(agent_set_scripted_destination, ":agent", pos4),
(try_end),
(try_begin),
(eq, "$g_main_attacker_agent", "trp_belligerent_drunk"),
(agent_is_wounded, "$g_main_attacker_agent"),
(assign, "$belligerent_drunk_wounded", "$g_encountered_party"),
(try_end),
(party_get_slot, ":tavernkeeper", "$g_encountered_party", slot_town_tavernkeeper),
(start_mission_conversation, ":tavernkeeper"),
]),
A new simple trigger.
Code:
(2,
[
(try_begin),
(neq, "$belligerent_drunk_wounded", 0),
(set_spawn_radius,0),
(spawn_around_party,"$belligerent_drunk_wounded","pt_drunk"),
(assign,"$belligerent_drunk_wounded",reg(0)),
(party_set_ai_behavior,"$belligerent_drunk_wounded",ai_bhvr_track_party),
(party_set_ai_object,"$belligerent_drunk_wounded","p_main_party"),
(try_end)
]),
Paste this anywhere above #TAVERN DRUNK DIALOGS (directly above it works fine)
Code:
[anyone, "start",
[
(eq, "$talk_context", tc_party_encounter),
(eq, "$g_talk_troop", "trp_belligerent_drunk"),
],
"Ah, I've managed to catch up to you before you left.", "drunk_wants_to_join_party",
[
]],
[anyone|auto_proceed, "drunk_wants_to_join_party",
[
],
"", "drunk_wants_to_join_party_1",
[
(store_random_in_range, "$belligerent_drunk_wounded", 0, 2),
]],
[anyone, "drunk_wants_to_join_party_1",
[
(eq, "$belligerent_drunk_wounded", 0),
],
"I was not myself in there, and you spared me from death. In the past years, I've lost most of my friends, my wife, and my health to drinking. If you would be willing to accept me into your party, I would be very grateful.", "drunk_wants_to_join_party_can_he",
[
(assign, "$belligerent_drunk_wounded", 0),
]],
[anyone, "drunk_wants_to_join_party_1",
[
(eq, "$belligerent_drunk_wounded", 1),
],
"I must admit, that was the first time that I got that drunk. A few days earlier, I was disowned by my father. My father is quite good friends with the lord here, so when I was caught trespassing on the lord's property, he was quite angry. Then, when he forbade me from leaving the house, and again, I disobeyed him. He then disowned me. I spent my last few days on the streets, and my last gold went to the drink. If you could accept me into your party, I would be extremely grateful.", "drunk_wants_to_join_party_can_he",
[
(assign, "$belligerent_drunk_wounded", 0),
]],
[anyone|plyr, "drunk_wants_to_join_party_can_he",
[
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
],
"Very well. Welcome to the legion of {playername}!", "close_window",
[
(party_add_members, "p_main_party", "trp_belligerent_drunk", 1),
(remove_party, "pt_drunk"),
]],
[anyone|plyr, "drunk_wants_to_join_party_can_he",
[
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(lt, ":free_capacity", 1),
],
"I'm afraid I don't have room for more men in my party. You have my sincere apologies.", "close_window",
[
(remove_party, "pt_drunk"),
]],
[anyone|plyr, "drunk_wants_to_join_party_can_he",
[
],
"I have no wish to accept drunkards to my party. Goodbye.", "close_window",
[
(remove_party, "pt_drunk"),
]],
Code:
("drunk","Beligerent Drunk",icon_peasant,0,fac_innocents,merchant_personality,[(trp_belligerent_drunk,1,1)]),
No errors upon compiling, but just nothing happens in-game.