Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Posts posted by tipforeveryone

  1. On 5/7/2019 at 1:54 PM, Lethal Raptor Games said:

    Isn't it supposed to be self.entity?  You are creating a new variable called myEntity and setting it to nil, no where is it being assigned the entity the script belongs too.

    He put "Sol" entity to the input, this is really weird. What is that Sol object ? a pivot ?

    • Like 1
  2. I have more simple one, only for detecting mouse scroll up/down, not for calculating HOW much scroll

    in Main.lua, add this at the bottom of main while loop (right above "end")

    image.png.493a001fabaa6eac5116159ed245541b.png

    lastMouseZ = window:GetMousePosition().z

    and add this as a Global function

    MouseScrollDirection = function()
      if window:GetMousePosition().z < lastMouseZ then return 1 --scolled up
      elseif window:GetMousePosition().z > lastMouseZ then return 2 --scrolled down
      elseif window:GetMousePosition().z == lastMouseZ then return 0 end --no scroll
    end

    Use this function in any Script:UpdateWorld() function to detect mouse scroll

    function Script:UpdateWorld()
      if MouseScrollDirection == 1 then
        --do something with scroll up
        --example: camera:Move(0,0,1)
      end
      if MouseScrollDirection == 2 then
        --do something with scroll down
        --example: camera:Move(0,0,-1)
      end
    end

     

    • Like 1
  3. My map is using terrain 256 x 256 and the range is about 220 / 256 of the map

    and this render glitch occur at closer range infact, about 40m (ingame) and when there is 2 layer of meshes are close to eachother.

    camera range is from 0 to 10000

     

  4. Yep, I think even Turbo will be the lastest engine of Leadwerks in near future, but old one like 4.x need to be perfect because there will be more people will buy this engine. They will try the demo and learn in many possible ways. So that they hate to get annoying problems and make them think Leadwerks suck. I can't stand thinking that way hehe

  5. Today I updated to Official 4.6 Release

    Create a new project from FPS Template, Load "AI and Events" map, play the game

    After shooting the pistol 6 times, the game crash, something need to be fixed with this weapon.

    This might be the most brutal mood killer for new user who try leadwerks for the first time I think.

×
×
  • Create New...