Jump to content

Tomas

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by Tomas

  1. How, can i get this id, and where to put it Josh? Can u refer to tutorial or maybe tell a bit more detail about this?
  2. Hi. Just tried multiplayer mode and it works fine under editor, but when i publish the game it fails to create server. Any ideas what is wrong here?
  3. Hi everyone. Does LE 4 has implemented LOD system or I have to implement it myself? If it has, can someone please refer me to info or article about it. Thanks.
  4. Finally sorted this out myself. That's the code now: Script.a=0 Script.mtl=NULL Script.srf=NULL Script.col=Vec4() function Script:Start() self.srf = self.entity:GetSurface(0); self.mtl=self.srf:GetMaterial() end function Script:UpdateWorld() self.col=self.mtl:GetColor() self.col.r = self.col.r self.col.g = self.col.g self.col.b = self.col.b self.col.a = self.col.a-self.a self.mtl:SetColor(self.col) self.a=self.a+0.0001 end
  5. Script.a=0 Script.mtl=NULL Script.srf=NULL function Script:Start() self.srf = self.entity:GetSurface(0); self.mtl=self.srf:GetMaterial() end function Script:UpdateWorld() self.mtl:SetColor(255,255,255,self.a) self.a=self.a+0.001 end That's the lua skydome code I have so far. It goes from transparent to solid, but theres no texture, just color. If I remove "SetClolor()" the texture is back to place. Any ideas?
  6. ...nothing seems to work.I'm attaching my file with tree. maybe someone can have a look at it. .blend an .fbx formats model.zip
  7. Im using vegetation leaves shader with terrain vegetation. How i set, or whats setting vertex color?
  8. I've sorted out shadows. The shadows checkbox in terrain/vegetation was not checked. But the leave movement is still not working. I wander could that be a geometry problem. I used rectangles divided in a half by width and height, so in one plane there is 4 faces.
  9. Hi. I've created a tree in blender similar to pine tree that comes with LE. But the tree in LE has moving branches and my branches dont move. Material settings and shaders are identical to the pine in LE. Used PNG as textures. Also branches dont cast shadow on each other even if the ''cast shadow'' box is set in material. The shadow casted is only on the ground. Any ideas what im doing wrong?
  10. I think any manipulation is not possible, since vegetation is not stored in memory but uses drawing algorithm which draws entities dynamically every frame depending on seed....
  11. ID=30 for terrain vegetation tree. Which is not docummented. Some "x" class. Terrain is 20 and model is 2.
  12. no it doesnt. Have to hurry to work, talk to u later...
  13. but it has to be some entity this reports true: if self.picked_entity then context:DrawText("Picked".."entity",10,60) else context:DrawText("Picked ".."nothing",10,60) end
  14. pickinfo.entity:GetPosition() does not report any values (all 0)
  15. How can i check this? I mean content..
  16. I used a variable for picking and when a cursor was on the tree it was positive, also the tree material picking flag is set. I assume that picking is possible, but is it possible to ineract like change rotation? ... if self.camera:Pick(mousepos.x,mousepos.y,pickinfo) then self.picked_entity=pickinfo.entity if window:KeyDown(Key.L) then self.ok_picked=1 --pickinfo.entity:Hide() pickinfo.entity:Turn(0,Time:GetSpeed()*0.5,0) else self.ok_picked=0 end end ... self.ok_picked ws positive when cursor was on the tree
  17. ..... if self.camera:Pick(mousepos.x,mousepos.y,pickinfo) then self.picked_entity=pickinfo.entity if window:KeyDown(Key.L) then pickinfo.entity:Turn(0,Time:GetSpeed()*0.5,0) end end ...... Hi is it possible in any ways to inerract with terrain vegetation, like trees? I want trees to be cuttable, is there any way to do this? I tried picking, it picks the tree but any interaction like moving, hiding, rotating wont work
  18. Cool thanks alot gamecreator
  19. Hi, are there any functions for fog creation?
  20. Ok guys, thanks for help. Not working for me. I found another solution: http://www.leadwerks.com/werkspace/topic/12537-drawing-a-section-of-a-2d-texture-setting-uv-coords/#entry90453
  21. Finally got it working. A bit laggy, but working. Theres my code: Script.buffer=0 Script.mapcam=0 function Script:Start() .... self.camera=Camera:Create() self.camera:SetRotation(0,0,0) self.camera:SetPosition(self.entity:GetPosition(true)+Vec3(0,1.8,0)) self.buffer = Buffer:Create(100, 100, 1, 1, 0) self.mapcam = Camera:Create() self.mapcam:SetRenderTarget(self.buffer:GetColorTexture()) end function Script:UpdateWorld() .... local buff=Buffer:GetCurrent() Buffer:SetCurrent(self.buffer) world:Render() Buffer:SetCurrent(buff) end function Script:PostRender(context) .... context:DrawImage(self.buffer:GetColorTexture(),0,0,100,100) end Didnt managed to get "camera:Render()" to work. Any ideas? The code actually renders same scene..
  22. I would say 2 cameras would be less costly
  23. Thanks guys. Need to study and try this... What if to have 2 cameras and use one as usual and other one for map?
  24. Im actually looking for viewport for minimap, so i can scale map and still have the bounds and see the 3d view. Maybe there are other workarounds for that?
×
×
  • Create New...