设置传奇人物足迹特效教程-996引擎特效表配置与脚本触发全解

发布时间:2026-10-28 13:19:40 分类: 传奇脚本下载

设置足迹特效命令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)

上一篇 传奇检测获取地图NPC坐标命令-996引擎NPC坐标读取与范围检测全解
下一篇 996引擎刷新战力命令教程-立即刷新与延迟刷新参数全流程