2013年12月6日 星期五

My scene lua script editor functionality

The demo is here:
  • Create floor board
local ShapeData = CShapeData()
    ShapeData.m_strPathFileName = "test02.mesh"
      ShapeData.m_ScalerData.m_ScaleFactor.m_fX = 1000
        ShapeData.m_ScalerData.m_ScaleFactor.m_fZ = 1000
          local Shape = GenerateShape(ShapeData)
          • Create a barrel object
          local ShapeData = CShapeData()
          ShapeData.m_strPathFileName = "Barrel.mesh"
          local Shape = GenerateShape(ShapeData)
          • In the center is the origin, range in length from 100 to create the object in random
          math.randomseed(os.time())

          function GetDirection()
          local Inverse = math.random(100)
          if Inverse >= 50 then
          return 1
          end
          return -1
          end

          local ShapeData = CShapeData()
          ShapeData.m_strPathFileName = "Barrel.mesh"
          local Center = CVector3(0.0, 0.0, 0.0)
          local Shape
          local OffestValue
          local Inverse
          for i = 1, 20 do
          OffestValue = math.random(100)
          ShapeData.m_LocationData.m_Position.m_fX = Center.m_fX+OffestValue*GetDirection()
          OffestValue = math.random(100)
          ShapeData.m_LocationData.m_Position.m_fZ = Center.m_fZ+OffestValue*GetDirection()
          Shape = GenerateShape(ShapeData)
          end

          The reference video is here:


          Dream continues in...

          2 則留言:

          1. 請問你是製作輪迴unknown這款遊戲的人嗎?
            我好不容易從youtube上看到遊戲片段
            輪迴是我國中時買來玩的
            當時覺得不管畫面跟操作還有劇情都很棒!
            由於懷念所以又去網購了一次
            但是完全進不去了!
            不知是電腦太新跑不動還是怎麼樣
            老是跑出cannot install driver的字眼
            想請問一下要怎麼辦!

            回覆刪除
          2. 這個專案太久了,我也沒有原始碼?我有空再把遊戲安裝在我的筆電上試試看,抱歉了。

            回覆刪除