equip an object

正在查看此主题的用户

havena

Sergeant
hello,

I'm new here, I am testing the mod script.

I have a little script that adds a device to a player (with item_set_slot), when I look at the equipment, the object is well, but I can not take it (switch) I have to wait for the next round.

Is there a solution for this?

Thank you
 
item_set_slot will not equip an item.
agent_equip_item will equip an item. (Warband 1.130+)

*_get_slot and *_set_slot operations deal with arrayed variables assigned to the '*' object, be it an item, agent, troop, what have you.

Perhaps see my post on Module System Syntax if you haven't already.
 
i find
agent_equip_item                      = 1779   # (agent_equip_item,<agent_id>,<item_id>), #for weapons, agent needs to have an empty weapon slot

but i have a script warning :

#
(player_is_active, ":player_no"),
(player_get_agent_id, ":agentid", ":player_no"),
(agent_equip_item,":agentid",":item_no"),
  #
 
If this is for Single Player, that code should work perfectly. If it's for multiplayer, make sure that only the server is running it.
Also, what type of error are you getting? What opcode number is it on? Can we see a bit more of the code, preferably where you defined or first used your variables.
 
but where put this code (agent_equip_item) for equip an objet selected in equip menu?
 
后退
顶部 底部