- 好友
- 1
- 在线时间
- 617 小时
- 最后登录
- 2024-11-19
子爵[版主]
- UID
- 75439
- 第纳尔
- 6907
- 精华
- 0
- 互助
- 6
- 荣誉
- 1
- 贡献
- 190
- 魅力
- 32
- 注册时间
- 2008-5-3
鲜花( 8) 鸡蛋( 0)
|
本帖最后由 easewater 于 2021-1-22 15:58 编辑
从@有限幻想那抄了一段代码,给自定义兵种换装,其他8样都装备上了,就是马总是装备不了,代码如下,这段代码放置在module_mission_templates.py中相应场景下的ti_on_agent_spawn里,custom_horse是存放马的箱子,custom_troop_1是装备马的部队,请各位指点错在哪里,谢谢
(try_begin),
(agent_get_troop_id, ":troop_no", ":agent_no"),(is_between, ":troop_no", "trp_custom_troop_1", "trp_xinbing_begin"),#兵种判断
(troop_get_inventory_capacity, ":inv_size", "trp_custom_horse"),
(try_for_range, ":i_slot", "$hyidg_horse", ":inv_size"),
(troop_get_inventory_slot, ":horse", "trp_custom_horse", ":i_slot"),(gt,":horse",0),(item_get_type,":type_9",":horse"),
(eq,":type_9",itp_type_horse),
(agent_equip_item,":agent_no",":horse"),(assign,":inv_size",0),(assign,"$hyidg_horse",":i_slot"),(val_add,"$hyidg_horse",1),#添加-马
(try_end),
(try_end),
|
|