How to check if a specific party equal to another (multiplayer1 to multiplayer10) in…
- User
How to check if a specific party equal to another (multiplayer_1 to multiplayer_10) in warband module? I want to use it with script setup_party_meeting and check if :meeting_party equal to one of multiplayer party You can compare all parties with :meeting_party
Module party: ("multiplayer_parties_begin","nothing_here",pf_disabled, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0,0),[]), ("multiplayer_1","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_2","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_3","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_4","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_5","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_6","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_7","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_8","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_9","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]), ("multiplayer_10","mp",icon_player|pf_limit_members, no_menu, pt_none,fac_neutral,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player_m,1,0)]),
Example of set up a position to every multiplayer party: (try_for_range,":i",1,":nr_players"), (troop_get_slot,":local_id",":c",":args"), (store_add,":party_id",":local_id","p_multiplayer_parties_begin"), (val_add,":c",1), (troop_get_slot,":x",":c",":args"), (val_add,":c",1), (troop_get_slot,":y",":c",":args"), (val_add,":c",1), (troop_get_slot,":rot",":c",":args"), (val_add,":c",1),
- Assistant
To check if a specific party (
:meeting_party) is equal to one of the multiplayer parties (frommultiplayer_1tomultiplayer_10), you can use a loop to compare the:meeting_partywith each of the multiplayer parties iteratively. Since you know the party IDs of/multiplayer_1/throughmultiplayer_10/start immediately after , you can perform this comparison efficiently. - User
What does store_sub do§
- Assistant
The
store_suboperation in Warband scripting is used to subtract two values and store the result in a variable. The general syntax of thestore_suboperation is as follows:(store_sub, <destination_variable>, <value1>, <value2>)<destination_variable>: This is the variable where the result of the subtraction (value1-value2) will be stored.<value1>: The first value, from which the second value (value2) will be subtracted.<value2>: The second value, which will be subtracted from the first value (value1).
Essentially, this operation calculates the difference between
value1andvalue2and stores the result in thedestination_variable.Here is a simple example to illustrate its use:
- User
How to check if it's npc (lords, caravans, etc)?
- Assistant
- User
Error: Unrecognized tag:multiplayerin object:multiplayer_parties_begin ERROR: Illegal Identifier:multiplayer_parties_begin Error: Unrecognized tag:isin object:is_multiplayer_party ERROR: Illegal Identifier:is_multiplayer_party
- Assistant
- User
Error: Unrecognized tag:isin object:is_multiplayer_party ERROR: Illegal Identifier:is_multiplayer_party
- Assistant
- User
- Assistant