骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买霸主CDKEY 购买战帆CDKEY
查看: 8374|回复: 18

[求助] 请教这段agent代码有什么错误

[复制链接]

30

主题

267

回帖

274

积分

见习骑士

Rank: 3

UID
3225805
第纳尔
1399
精华
0
互助
37
荣誉
0
贡献
0
魅力
259
注册时间
2021-3-14
鲜花(53) 鸡蛋(0)
发表于 2021-4-27 17:28:10 | 显示全部楼层 |阅读模式
(agent_is_non_player, ":kill"),  #agent不是玩家
  (agent_is_human,":kill"),  agent是人类
  (agent_is_alive, ":kill"), agent有效的
  
  (get_player_agent_no, ":player"),  #获取玩家agent
  (agent_is_alive, ":player"),  #玩家agent是有效的
  (get_player_agent_kill_count,":player",":kill"),  #获取玩家agent的杀人数
  
  (eq,":kill", 20),  #杀人数=20
  (play_sound, "snd_encounter_looters"), #播放音效


我的想法大致就是玩家在战斗中的杀人数达到一定的量就播放一个音效,没接触过agent的使用,希望大佬们赐教

30

主题

267

回帖

274

积分

见习骑士

Rank: 3

UID
3225805
第纳尔
1399
精华
0
互助
37
荣誉
0
贡献
0
魅力
259
注册时间
2021-3-14
鲜花(53) 鸡蛋(0)
 楼主| 发表于 2021-4-27 18:05:49 | 显示全部楼层
幼稚园殺手 发表于 2021-4-27 17:51
你第一句写的不是玩家,后面要因为玩家杀敌才能获得这个音效,矛盾了,而且你的局部变量怪怪的,前面的kill ...

  (agent_is_human,":renlei"),  agent是人类
  (agent_is_alive, ":renlei"), agent有效的
  (get_player_agent_no, ":player"),  #获取玩家agent
  (agent_get_troop_id,":player"),
  (eq, ":player",  "trp_player"),

  (get_player_agent_kill_count,":renlei",0),  #获取玩家agent的杀人数 ,不算击晕
  
  (eq,":renlei", 20),  #杀人数=20
  (play_sound, "snd_encounter_looters"), #播放音效
这样?

30

主题

267

回帖

274

积分

见习骑士

Rank: 3

UID
3225805
第纳尔
1399
精华
0
互助
37
荣誉
0
贡献
0
魅力
259
注册时间
2021-3-14
鲜花(53) 鸡蛋(0)
 楼主| 发表于 2021-4-27 18:40:16 | 显示全部楼层
幼稚园殺手 发表于 2021-4-27 18:18
(agent_is_human,":renlei"),  agent是人类
  (agent_is_alive, ":renlei"), agent有效的
  (get_pla ...

(agent_is_human,":renlei"),  
  (agent_is_alive, ":renlei"),

这两个未赋值

30

主题

267

回帖

274

积分

见习骑士

Rank: 3

UID
3225805
第纳尔
1399
精华
0
互助
37
荣誉
0
贡献
0
魅力
259
注册时间
2021-3-14
鲜花(53) 鸡蛋(0)
 楼主| 发表于 2021-4-27 18:49:29 | 显示全部楼层
幼稚园殺手 发表于 2021-4-27 18:43
(agent_is_human,":renlei"),  agent是人类
  (agent_is_alive, ":renlei"), agent有效的
  (get_p ...

还是未赋值     太难了我的天

30

主题

267

回帖

274

积分

见习骑士

Rank: 3

UID
3225805
第纳尔
1399
精华
0
互助
37
荣誉
0
贡献
0
魅力
259
注册时间
2021-3-14
鲜花(53) 鸡蛋(0)
 楼主| 发表于 2021-4-27 20:37:24 | 显示全部楼层
在那悠远的苍穹 发表于 2021-4-27 19:35
(get_player_agent_no, ":player"),
  (agent_is_alive, ":player"),
  (get_player_agent_kill_count, ...

(ti_on_agent_spawn, 0, 0,[],
    [
    (get_player_agent_no, ":player"),
     (agent_is_alive, ":player"),
     
     (get_player_agent_kill_count,":count"),
   (eq, ":count", 8),
   (play_sound, "snd_encounter_looters"),
   (display_message,"@123"),
          ]),

编译进了 但貌似没起效果
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2025-12-21 23:36 , Processed in 0.098201 second(s), 19 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表