• The forum has been updated. For an explanation of some of the changes, head over here.

WB Coding Parties belong who?

Currently viewing this thread:

I added a triggers look like, I want to if p_town_6 has belong to fac_kingdom_6, code must me active, if p_town_6 has belong another kingdom code must be disable.

(5.7, 0, 5.0,
[
(store_num_parties_of_template, reg3, "pt_crusade_army"),
(lt, reg3, 2),
(faction_slot_eq, "fac_kingdom_15", slot_faction_state, sfs_active),
],
[

(set_spawn_radius, 2),
(spawn_around_party, "p_town_34", "pt_crusade_army"),
(assign, ":spawned_party", reg0),
(call_script, "script_party_set_ai_state", ":spawned_party", spai_patrolling_around_center, "p_town_6"),
(party_set_slot, ":spawned_party", slot_party_ai_object, "p_town_6"),
(party_set_ai_behavior, ":spawned_party", ai_bhvr_attack_party),
(party_set_ai_object, ":spawned_party", "p_town_6"),

]),
 
Solution
You can use store_faction_of_party.

(store_faction_of_party, ":center_faction", "p_town_6"),

(eq, ":center_faction", " fac_kingdom_6 "),

Tocan

Sergeant Knight at Arms
You can use store_faction_of_party.

(store_faction_of_party, ":center_faction", "p_town_6"),

(eq, ":center_faction", " fac_kingdom_6 "),
 
Upvote 0
Solution
Top Bottom