Error with items in client player

正在查看此主题的用户

javico

Veteran
Hi all,

I'm creating a multiplayer mod and I have it nearly finished. Only bug that I dont know why it's happening is one relationed with items. When a player enter in the second faction and choose one troop type he see the equipment I have fixed for it. But when he spawns, he does it nude, without items. On the other hand if the player is the server, he spawns with items. Why can this be caused?
 
if i am understanding you correctly, I have the same problem too... don't have a solution yet.
 
I have solved :grin:
You have to look for "script_multiplayer_set_item_available_for_troop" in module_scripts. You will find something like that:
插入代码块:
#1-Swadian Warriors
      #1a-Swadian Crossbowman
	  (call_script, "script_multiplayer_set_item_available_for_troop", "itm_ankle_boots", "trp_swadian_crossbowman_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_coat_of_plates_red", "trp_swadian_crossbowman_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_tab_shield_round_e", "trp_swadian_crossbowman_multiplayer"),

There, you set items available for troops. If the item is not here, troop can choose it in the equipment menu but he won't spawn with it.
 
javico 说:
I have solved :grin:
You have to look for "script_multiplayer_set_item_available_for_troop" in module_scripts. You will find something like that:
插入代码块:
#1-Swadian Warriors
      #1a-Swadian Crossbowman
	  (call_script, "script_multiplayer_set_item_available_for_troop", "itm_ankle_boots", "trp_swadian_crossbowman_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_coat_of_plates_red", "trp_swadian_crossbowman_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_tab_shield_round_e", "trp_swadian_crossbowman_multiplayer"),

There, you set items available for troops. If the item is not here, troop can choose it in the equipment menu but he won't spawn with it.

that's weird. I quite sure if the item is not here, the troop can't even choose it in the equipment.
guess we had a diff. problem then (I'm sure I added that part :smile: ).
 
Well, I write the items down in module_troops but not here. So the items were shown in the equipment window but were not there when spawn.
 
The items that you put in module_troops will automatically become the default items (and therefore free) when you select them.
 
后退
顶部 底部