设置足迹特效命令SetMoveEff 参数1
参数1:特效ID
[@设置足迹]
#if
#act
SetMoveEff 256
SENDMSG 5 添加足迹脚印成功!
;LUA例子
[[服务端]]
setotherparams(actor,1,3)
-- setotherparams(actor,2,256)
setotherparams(actor,2,414)
[[客户端]]
SL:RegisterLUAEvent(LUA_EVENT_ACTOR_GMDATA_UPDATE, "ACTOR_GM_DATA", function (tab)
SL:dump(tab,"自定义数据改变")
SL:dump(SL:GetMetaValue("ACTOR_GM_DATA",tab.id),"获取actor的GM自定义数据")
end)
[[足迹示例]]
local function moveEvent(data)
local actorID = data and data.id
if actorID then
local posX = SL:GetMetaValue("ACTOR_POSITION_X", actorID)
local posY = SL:GetMetaValue("ACTOR_POSITION_Y", actorID)
local dir = SL:GetMetaValue("ACTOR_DIR", actorID)
local effectModel = SL:GetMetaValue("ACTOR_GM_DATA", actorID)[1]
local effectID = SL:GetMetaValue("ACTOR_GM_DATA", actorID)[2]
if effectID ~= 0 and posX and posY then
local actBegin = data.act
if actBegin == 1 or actBegin == 6 or actBegin == 17 then
local eff = GUI:Effect_Create(GUI:Attach_SceneB(), string.format("foot_effect%s_%s%s", actorID, posX, posY), posX, posY, effectModel, effectID, 0,0 , dir, 0.8)
GUI:setScale(eff, 0.3)
if eff then
GUI:Effect_addOnCompleteEvent(eff, function()
GUI:removeFromParent(eff)
end)
end
end
end
end
end
SL:RegisterLUAEvent(LUA_EVENT_PLAYER_ACTION_BEGIN, "GUIUtil", moveEvent)
SL:RegisterLUAEvent(LUA_EVENT_NET_PLAYER_ACTION_BEGIN, "GUIUtil", moveEvent)
版权声明
1、本站所有内容均由互联网收集整理、网友上传,仅供大家参考、学习研究使用,不存在任何商业目的与商业用途。
2、论坛的所有内容都不保证其准确性,完整性,有效性,因本站内容因误导等因素而造成的损失本站不承担连带责任。
3、本站以《2013 中华人民共和国计算机软件保护条例》第二章 “软件著作权” 第十七条为原则:为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,若有用户需要商用本站资源,请务必联系版权方购买正版授权!
|
上一篇:引擎设定传奇游戏绑定规则教程-996引擎
|