龙7483 发表于 2026-1-15 07:25:23

设置传奇人物足迹特效教程-996引擎

设置足迹特效命令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)
local effectID = SL:GetMetaValue("ACTOR_GM_DATA", actorID)
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)

牛家村专属 发表于 2026-1-15 07:33:48

感谢站长分享传奇教程,让我学习到很多知识。

仙诡迷失 发表于 2026-1-15 11:54:46

这个帖子不回对不起自己!

漠北双刀 发表于 2026-1-15 23:23:52

这东西我收了!谢谢楼主!

玩命道盾英雄 发表于 2026-1-16 14:53:07

在这里可以学到很多传奇一条龙开区时遇到的问题。

炎黄沉默 发表于 2026-1-17 19:21:03

新手上路不用愁,碰到传奇架设问题可以来这搜索。

彼岸沉默 发表于 2026-1-18 03:55:17

这东西我收了!谢谢楼主!

九霄沉默 发表于 2026-1-18 07:13:19

新手上路不用愁,碰到传奇架设问题可以来这搜索。

封神道盾合击 发表于 2026-1-18 21:35:08

楼主发贴辛苦了,谢谢楼主分享!

专属单职业 发表于 2026-1-19 00:03:50

开传奇一条龙不求人,自己学习架设。
页: [1] 2 3 4
查看完整版本: 设置传奇人物足迹特效教程-996引擎