- 好友
- 7
- 在线时间
- 0 小时
- 最后登录
- 2024-12-26
见习骑士
- UID
- 3189500
- 第纳尔
- 2709
- 精华
- 0
- 互助
- 26
- 荣誉
- 6
- 贡献
- 20
- 魅力
- 437
- 注册时间
- 2020-6-13
鲜花( 68) 鸡蛋( 0)
|
发表于 2023-9-27 16:52:13
|
显示全部楼层
还有可以在“spawn record”的地方用add_reinforcements_to_entry生成增援部队
比如攻城场景下的开头部分:
(0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,15,[]),
(0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]),
(10,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),
(11,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,10,[]),
(15,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),
这里的每一个生成点就是spawn record,根据mtef_team标识来生成指定队伍。比如上面的分别对应0-4
参考原版守军增援代码:
- common_siege_defender_reinforcement_check = (
- 3, 0, 5, [],
- [(lt, "$defender_reinforcement_stage", 7),
- (store_mission_timer_a,":mission_time"),
- (ge,":mission_time",10),
- (store_normalized_team_count,":num_defenders",0),
- (lt,":num_defenders",8),
- (add_reinforcements_to_entry,4, 7),
- (val_add,"$defender_reinforcement_stage",1),
- (try_begin),
- (gt, ":mission_time", 300), #5 minutes, don't let small armies charge
- (get_player_agent_no, ":player_agent"),
- (agent_get_team, ":player_team", ":player_agent"),
- (neq, ":player_team", "$defender_team"), #player should be the attacker
- (neq, ":player_team", "$defender_team_2"), #player should be the attacker
- (ge, "$defender_reinforcement_stage", 2),
- (set_show_messages, 0),
- (team_give_order, "$defender_team", grc_infantry, mordr_charge), #AI desperate charge:infantry!!!
- (team_give_order, "$defender_team_2", grc_infantry, mordr_charge), #AI desperate charge:infantry!!!
- (team_give_order, "$defender_team", grc_cavalry, mordr_charge), #AI desperate charge:cavalry!!!
- (team_give_order, "$defender_team_2", grc_cavalry, mordr_charge), #AI desperate charge:cavalry!!!
- (set_show_messages, 1),
- (ge, "$defender_reinforcement_stage", 4),
- (set_show_messages, 0),
- (team_give_order, "$defender_team", grc_everyone, mordr_charge), #AI desperate charge: everyone!!!
- (team_give_order, "$defender_team_2", grc_everyone, mordr_charge), #AI desperate charge: everyone!!!
- (set_show_messages, 1),
- (try_end),
- ])
复制代码
|
|