Jump to content

Tommek

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by Tommek

  1. local Distance = self.entity:GetDistance(self.Player)

    if (Distance < self.ViewDistanceMax and Distance > self.ViewDistanceMin) then

     

    Same error. Do I have to call self.Player in a different way inside the if-statement?

  2. Script.Player = "" --entity "Player Entity"
    Script.ViewDistanceMin = 10 --float "View Distance Min"
    Script.ViewDistanceMax = 100 --float "View Distance Max"
    Script.DistancePollTime = 3 --int "Secs Poll Distance"
    Script.PollTimer = 0
    function Script:Start()
    self.entity:Hide()
    end
    function Script:UpdateWorld()
    
    self.PollTimer = self.PollTimer + (Time:GetSpeed()/100)
    if (self.PollTimer > self.DistancePollTime) then
     self.Distance = self.entity:GetDistance(self.Player)
     if (self.Distance < self.ViewDistanceMax and self.Distance > self.ViewDistanceMin) then
      self.entity:Show()
     else
      self.entity:Hide()
     end
    
     self.PollTimer = 0
    end
    end
    

     

    I've added Aggrors ideas, but now I get: 18 : error in function 'GetDistance'.; argument #2 is 'string'; 'Entity' expected.

     

    Why did this change the context?

  3. Yeah I will try to get some fading running. But as it seems It is not really usuable in LUA. My demo Level takes forever to start (17 entites with 3 detail levels), but after that it seems to run nice.

     

    Could someone test this in C++? I'm just looking for the last push to buy myself a c++ License ;)

  4. Hi Guys,

     

    I've made myself a really simple LOD Script in Lua.

     

    Script.Player = "" --entity "Player Entity"
    Script.ViewDistanceMin = 10 --float "View Distance Min"
    Script.ViewDistanceMax = 100 --float "View Distance Max"
    function Script:Start()
    self.entity:Hide()
    end
    function Script:UpdateWorld()
    if (self.entity:GetDistance(self.Player) < self.ViewDistanceMax and self.entity:GetDistance(self.Player) > self.ViewDistanceMin) then
     self.entity:Show()
    else
     self.entity:Hide()
    end
    end
    

     

    So for an instance I want to use this, I create 3 different models (HD, SD, Low) and give them distances like: HD 0/9.0, SD 9.1/25.0, Low 25.1/2000.0

     

    My problem here is the switchover that is not really smooth. Because if the player entity is slow you see the flickering. If I set the distances equal they overlap.

     

    The overlapping is quite ok. But is there a possibility to make a smooth morph?

    • Upvote 1
  5. Hi Guys,

     

    is there a nice tutorial on how to import models to Leadwerks? I get a lot of different formats, but nothings really working.

    I know so for, I have to use Blender.

     

    I opened an 3ds File and exportet it to FBX. But I only got errors in Leadwerks.

  6. Hi Guys,

     

    I have a bunch of computers and thanks to steam, Leadwerks runs on (almost) all of them.

    How do you keep track of your current projects?

     

    One could use subversion, although the binary files would be a pain. Does anyone use a cloud? I've seen mega announced a linux-client that uses encryption. So this might be a way.

     

    Anything else? Would like to hear your ideas and workflows.

     

    regards,

    Tommek

×
×
  • Create New...