- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2024-10-18
扈从
- UID
- 3645558
- 第纳尔
- 140
- 精华
- 0
- 互助
- 8
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 51
- 注册时间
- 2024-4-15
鲜花( 6) 鸡蛋( 0)
|
## 战斗中召唤单位
**触发器是箭矢击中或武器攻击请看清楚 所有人均可使用**
1. 箭矢击中触发器;在以箭矢落点为重心的等边三角形的三个顶点上分别生成1名设定好的友方士兵:(300为重心到顶点的距离)
```python
(assign,":trp_id","trp_bandit"), #请配置trp_id为你需要的单位id,trp_bandit为示例id,请勿使用trp_bandit
(store_trigger_param_1, ":var_0"),
(agent_get_group, ":var_1", ":var_0"),
(agent_get_team, ":var_2", ":var_0"),
(position_rotate_z, pos1, -30),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos1, 300, 0),
(position_rotate_z, pos1, -120),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos1, 300, 0),
(position_rotate_z, pos1, -120),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
```
2. 箭矢击中或武器攻击触发器;在以召唤者为重心的等边三角形的三个顶点上分别生成1名设定好的友方士兵:(300为重心到顶点的距离)
```python
(assign,":trp_id","trp_bandit"), #请配置trp_id为你需要的单位id,trp_bandit为示例id,请勿使用trp_bandit
(store_trigger_param_1, ":var_0"),
(agent_get_group, ":var_1", ":var_0"),
(agent_get_team, ":var_2", ":var_0"),
(agent_get_position, pos2, ":var_0"),
(position_rotate_z, pos2, -30),
(position_move_x, pos2, -300, 0),
(set_spawn_position, pos2),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos2, 300, 0),
(position_rotate_z, pos2, -120),
(position_move_x, pos2, -300, 0),
(set_spawn_position, pos2),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos2, 300, 0),
(position_rotate_z, pos2, -120),
(position_move_x, pos2, -300, 0),
(set_spawn_position, pos2),
(spawn_agent, ":trp_id"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
```
3. 箭矢击中触发器;在以箭矢落点位置为重心的等边三角形的三个顶点上分别生成一名与距离与该位置最近的一名敌方士兵相同的友方士兵 (300为重心到顶点的距离)
```python
(store_trigger_param_1, ":var_0"),
(agent_get_group, ":var_1", ":var_0"),
(agent_get_team, ":var_2", ":var_0"),
(assign, ":var_3", 100000),
(assign, ":var_4", -1),
(try_for_agents, ":var_5"),
(agent_is_alive, ":var_5"),
(agent_is_human, ":var_5"),
(agent_get_position, pos2, ":var_5"),
(agent_get_team, ":var_6", ":var_5"),
(teams_are_enemies, ":var_2", ":var_6"),
(get_distance_between_positions, ":var_7", pos1, pos2),
(neg|ge, ":var_7", ":var_3"),
(assign, ":var_3", ":var_7"),
(assign, ":var_4", ":var_5"),
(try_end),
(try_begin),
(neg|eq, ":var_4", -1),
(agent_get_troop_id, ":var_8", ":var_4"),
(position_rotate_z, pos1, -30),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos1, 300, 0),
(position_rotate_z, pos1, -120),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos1, 300, 0),
(position_rotate_z, pos1, -120),
(position_move_x, pos1, -300, 0),
(set_spawn_position, pos1),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(try_end),
```
4. 箭矢击中触发器;在以距离箭矢落点位置最近的一名敌方士兵为重心的等边三角形的三个顶点上分别生成一名与其相同的友方士兵 (300为重心到顶点的距离)
```python
(store_trigger_param_1, ":var_0"),
(agent_get_group, ":var_1", ":var_0"),
(agent_get_team, ":var_2", ":var_0"),
(assign, ":var_3", 100000),
(assign, ":var_4", -1),
(try_for_agents, ":var_5"),
(agent_is_alive, ":var_5"),
(agent_is_human, ":var_5"),
(agent_get_position, pos2, ":var_5"),
(agent_get_team, ":var_6", ":var_5"),
(teams_are_enemies, ":var_2", ":var_6"),
(get_distance_between_positions, ":var_7", pos1, pos2),
(neg|ge, ":var_7", ":var_3"),
(assign, ":var_3", ":var_7"),
(assign, ":var_4", ":var_5"),
(try_end),
(try_begin),
(neg|eq, ":var_4", -1),
(agent_get_troop_id, ":var_8", ":var_4"),
(agent_get_position, pos3, ":var_4"),
(position_rotate_z, pos3, -30),
(position_move_x, pos3, -300, 0),
(set_spawn_position, pos3),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos3, 300, 0),
(position_rotate_z, pos3, -120),
(position_move_x, pos3, -300, 0),
(set_spawn_position, pos3),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(position_move_x, pos3, 300, 0),
(position_rotate_z, pos3, -120),
(position_move_x, pos3, -300, 0),
(set_spawn_position, pos3),
(spawn_agent, ":var_8"),
(agent_set_group, reg0, ":var_1"),
(agent_set_team, reg0, ":var_2"),
(agent_add_relation_with_agent, reg0, ":var_0", 1),
(try_end),
```
***
附一个网址(若打不开请使用chrome或用steam++等加速github):
https://b1inkie.github.io/b1note.github.io/
装备某件物品时增加属性点;添加书籍;全自动武器;自爆步兵;光环:移速BUFF(光写了 没测);散弹 但是每一个弹头都是自瞄;自定义战利品等等功能都可以在这里找到.
若依旧有疑问或需要视频讲解,可以加下面群:
附加1个交流群: 855512521
|
|