设置传奇人物足迹特效教程-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) 感谢站长分享传奇教程,让我学习到很多知识。 这个帖子不回对不起自己! 这东西我收了!谢谢楼主! 在这里可以学到很多传奇一条龙开区时遇到的问题。 新手上路不用愁,碰到传奇架设问题可以来这搜索。 这东西我收了!谢谢楼主! 新手上路不用愁,碰到传奇架设问题可以来这搜索。 楼主发贴辛苦了,谢谢楼主分享! 开传奇一条龙不求人,自己学习架设。