找回密码
 register
搜索
查看: 445|回复: 0

枚举当前人类个数 LuaFnGetCopyScene_HumanCount(sceneId) 当前场景人数

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:525
  • 打卡月天数:14
  • 打卡总奖励:523
  • 最近打卡:2026-06-16 00:44:54
Waylee 发表于 2022-8-18 18:18 | 显示全部楼层 |阅读模式

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×
枚举当前地图总人数

LuaFnGetCopyScene_HumanCount(sceneId)

案例:枚举人类全部的obj,并给一个失明BUFF
  1.   --枚举人类
  2.                 local nHumanCount = LuaFnGetCopyScene_HumanCount(sceneId);
  3.                 for i = 0, nHumanCount - 1 do
  4.                         x666889_tips(sceneId, selfId, "人物ID:"..LuaFnGetCopyScene_HumanObjId(sceneId, i))
  5.                         LuaFnSendSpecificImpactToUnit( sceneId, LuaFnGetCopyScene_HumanObjId(sceneId, i), LuaFnGetCopyScene_HumanObjId(sceneId, i), LuaFnGetCopyScene_HumanObjId(sceneId, i), 594, 0 ) --失明状态
  6.                 end
复制代码


您需要登录后才可以回帖 登录 | register

本版积分规则

QQ|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )|天天打卡

GMT+8, 2026-6-16 15:55 , Processed in 0.049996 second(s), 25 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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