- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2024-10-18
扈从
- UID
- 3645558
- 第纳尔
- 125
- 精华
- 0
- 互助
- 8
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 50
- 注册时间
- 2024-4-15
鲜花( 5) 鸡蛋( 0)
|
## 自爆步兵
进场后提高移速,冲锋贴近敌人后自爆
战场触发器,执行代码:
```python
#----------------------------------------------
(assign,":blow_dmg",1000), #设置自爆伤害
(assign,":blow_trpid","trp_rhodok_blow"), #设置自爆兵种ID
#----------------------------------------------
(assign, ":distance_closest", 1000),
(try_for_agents, ":blow_agent"),
(agent_is_alive, ":blow_agent"),
(agent_is_human, ":blow_agent"),
(agent_get_troop_id, ":tar_troop", ":blow_agent"),
(eq, ":tar_troop", ":blow_trpid"),
(agent_get_team, ":blow_team", ":blow_agent"),
(agent_get_position,pos2,":blow_agent"),
(agent_set_speed_modifier, ":blow_agent", 300),
(assign, ":blowed", 0),
(try_for_agents, ":enemies"),
(agent_is_alive, ":enemies"),
(agent_is_human, ":enemies"),
(agent_get_position, pos3, ":enemies"),
(agent_get_team, ":enemies_team", ":enemies"),
(teams_are_enemies, ":blow_team", ":enemies_team"),
(get_distance_between_positions, ":distance_abs", pos2, pos3),
(lt, ":distance_abs", ":distance_closest"),
(agent_deliver_damage_to_agent, ":blow_agent", ":enemies", ":blow_dmg"),
(assign, ":blowed", 1),
(try_end),
(eq, ":blowed", 1)
(agent_play_sound, ":blow_agent", "snd_pistol_shot"), #设置声音,如果MOD没有这个声音,请删掉这一行
(particle_system_burst,"psys_pistol_smoke",pos2,55), #设置烟雾,如果MOD没有这个烟雾粒子,请删掉这一行
(agent_deliver_damage_to_agent, ":blow_agent", ":blow_agent", 1000),
(try_end),
```
依旧是战场触发器,和之前的案例一样,不过自爆不用检测间隔很短,设置个两三秒都可以
比如```2.000000 0.000000 0.000000 0 <执行代码行数> <执行代码>```两秒检测一次.
如果不会添加战场触发器,请参考另一篇帖子:
https://bbs.mountblade.com.cn/thread-2104977-1-1.html
***
附一个网址(若打不开应该chrome或用steam++等加速github):
https://b1inkie.github.io/b1note.github.io/
装备某件物品时增加属性点;添加书籍;全自动武器;自爆步兵;光环:移速BUFF(光写了 没测);散弹 但是每一个弹头都是自瞄;自定义战利品等等功能都可以在这里找到.
若依旧有疑问或需要视频讲解,可以加下面群:
附加1个交流群: 855512521
|
评分
-
查看全部评分
鲜花鸡蛋幼稚园殺手 在2024-4-16 12:33 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下
|