打印

LUA 问题

LUA 问题

This is Battle Npc script portion
-----------------------------------------------------------
--設置NPC方向
        Char.SetData(_MeIndex, %對像_方向%, %下%);
------------------------------------------------------------
I do not understand This source
If XXXX.arg  設置NPC方向 = dir=?
Lua -> ???????????
I try find LNS It's failed.
Please tell me the direction of the LUA

TOP

== 客製化開發Lua NPC、服務端功能 有興趣可站內短訊息聯絡 ==

TOP

Then
---------------------------------------------------
     if i >= 4 then
                i = i - 4;
        else
                i = i + 4;        
        end
        Char.SetData(_MeIndex, %對像_方向%,i);
--------------------------------------------------
i = 4 -+ 4 ?
I understand but
I do not understand - i = i-4; , i=i+4;

TOP



↑ NPC direction table

if player direction is 5
-----------------------------------------------------
     if i >= 4 then    // 5 >= 4 .. 5 - 4 = 1  --  "i" is get from player direction

                i = i - 4;
        else
                i = i + 4;        
        end
        Char.SetData(_MeIndex, %對像_方向%,i);  // NPC will set the direction 1
-----------------------------------------------------
if you want to set the NPC direction , reference "NPC direction table"
附件: 您所在的用戶組無法下載或查看附件
== 客製化開發Lua NPC、服務端功能 有興趣可站內短訊息聯絡 ==

TOP

GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD

TOP