#248 LUA Support for using a door (widget)

已关闭
image3 年之前创建 · 0 条评论
image 评论于 3 年之前
  • new SpawnScripts function 'usedoor' function usedoor(NPC, Spawn, IsOpen) LUA Functions additionally needed:
  • OpenDoor, CloseDoor, IsOpen

Example script:

function usedoor(NPC, Spawn, IsOpen)
    if IsOpen == true then
        if Spawn then
            SendMessage(Spawn, "Door was open", "red")
        end
        
        CloseDoor(NPC)
    else
        if Spawn then
            SendMessage(Spawn, "Door was closed", "red")
        end
        
        OpenDoor(NPC)
    end
end
- new SpawnScripts function 'usedoor' ```function usedoor(NPC, Spawn, IsOpen)``` LUA Functions additionally needed: - OpenDoor, CloseDoor, IsOpen Example script: ``` function usedoor(NPC, Spawn, IsOpen) if IsOpen == true then if Spawn then SendMessage(Spawn, "Door was open", "red") end CloseDoor(NPC) else if Spawn then SendMessage(Spawn, "Door was closed", "red") end OpenDoor(NPC) end end ```
image3 年之前 关闭
登录 并参与到对话中。
正在加载...
取消
保存
这个人很懒,什么都没留下。