Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. no you do not have to do this. http://www.leadwerks.com/werkspace/topic/5776-solved-exporting-from-3d-world-studio-not-going-right/#entry50169
  2. You do not have to export to X from 3dws to UU3D then to gmf... you obviously are doing something wrong. My guess is that you did not make a material file for your textures in LE which is why no texture was assigned to the model initially. But UU3D creates default material files when you export which is why you saw them now. And the scale from 3dws to LE is 128:1.
  3. the scale relationship from 3dws to LE 128 to 1. So a cube made in 3dws that is 128x128x128 will be a 1x1x1 meter cube in LE
  4. i believe you can just download the demo from the products page and insert your registration key to give full access... that should give you the ability to 'SAVE' as gmf.
  5. its due to the KeyHit in the update... typically the first one is recognized in the loop and the rest are ignored... if you are trying to make all the doors open/close at the same time, then you have to loop thru all of the doors in that class... if you are just trying to open whatever door you are close to then, the best thing is like i suggested in one of your other posts, is to use the camera/controller to perform a pick on the door and send a message to that door to open/close... and are you sure this script "works perfectly"? you are spelling INTEGER incorrectly... and typically you would want your function to be stated prior to calling the function... so the 'function object:CheckDoor()' should be listed before the 'self:CheckDoor()' called in the 'function object:Update()'
  6. how to create a simple skybox using terragen for use in LE; http://www.leadwerks.com/werkspace/page/tutorials/_/artwork/creating-a-skybox-using-terragen-r82 a way to script creating the simple skybox using terragen: http://www.leadwerks.com/werkspace/page/tutorials/_/artwork/scripted-creating-a-skybox-using-terragen-r84 as far as a day/night atmosphere with clouds, sun, etc : http://www.leadwerks.com/werkspace/files/file/178-day-night-script/
  7. for a door i would probably use RotateEntity so you have control over the open/close angle easily... then have the controller send a message to the door if its picked to either open/close the door...
  8. i havent tried your code to see what else would be wrong, but the TurnEntity command is looking for a Vec3... so just change that line: model:Turn(self.rotationspeed,0) to: model:Turn(Vec3(0,self.rotationspeed,0),0) just playing around with the script, but this allows you to set the speed via the property dialog and pressing 'E' will rotate it opposite of current speed. require("scripts/class") require("Scripts/constants/engine_const") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) group=grid:AddGroup("Rotation") group:AddProperty("rotationspeed",PROPERTY_FLOAT,"2|-10,10,0") group:Expand() end function class:CreateObject(model) local object = self.super:CreateObject(model) object.model:SetKey("rotationspeed", 1.0) function object:UnlockKeys() self.rotationspeed = self.model:GetKey("rotationspeed") end function object:Update() if KeyHit(KEY_E)==1 then self.rotationspeed = self.rotationspeed*-1 self.model:SetKey("rotationspeed", self.rotationspeed) end model:Turn(Vec3(0,self.rotationspeed,0),0) end end
  9. please keep in mind that mika/lumooja/metatron/canardian has no affiliation with LE other than as a user... he just likes to pretend he works for Josh, so you can take his responses with a grain of salt. As far as a demo version available to run on mobile devices, josh has mentioned in his blogs using simulators, but no official mention what the exact plans are... best bet is to wait for Josh to answer as he would be the only one that actually knows.
  10. lol... i suspect that is very true... i don't even consider myself a programmer, but i spend a lot of time going back and cleaning up code for no other reason other than being very anal about having condensed/pretty code...
  11. yes, thats the exactly what i tried to show him in post #2 for all intents and purposes as far as minimal lua code with the exception of just using 1/0 rather than true/false... but since he is new to programming in general, probably writing it out 'long-hand' at first will help him understand the logic i guess... fumanshoo, this is the lua version of just what he is doing: debug = false --'initialize the variable before main loop' --'then inside the main loop' if KeyHit(KEY_Z)==1 then debug = not debug DebugPhysics(debug) end
  12. you have the 'debug = 0' and the 'debug = 1' swapped... debug gets set to a 0 the first time you hit Z and it never will be set to a 1.. also even if you fix that, using 'KeyDown' instead of 'KeyHit' will cause it to constantly cycle thru the code making it turn the debug on/off. if KeyHit(KEY_Z)==1 then if debug==1 then debug = 0 else debug = 1 end DebugPhysics(debug) end
  13. are you trying to just have the debug on as long as you have the 'Z' pressed? if so then: DebugPhysics(KeyDown(KEY_Z)) if you are trying to toggle it where each key hit will leave it turned on or off then: debug = 0 --'initialize the value' while KeyHit(KEY_ESCAPE)==0 do --'Main Loop' if KeyHit(KEY_Z)==1 then debug = 1 - debug DebugPhysics(debug) end ... ... end
  14. like chrisman suggests, i would use a standalone lua script to load the scene instead of running the game in the editor... it removes a lot of the frustration of forgetting to save your scene and restarting the editor all the time. lua is fine to program with as long as you are willing to troubleshoot errors by constantly checking the engine.log
  15. i am sure someone might do it, but i am unaware of anyone actively working on anything for LE2 docs... the wiki has a lot of good information, but it also has a lot of wrong/outdated information as well as prescriptions for viagra. Using a combination of the command reference here on this site and the wiki usually will answer your questions - and if not post it and someone will typically respond.
  16. http://www.leadwerks.com/werkspace/topic/2870-c-api-manual/page__hl__pdf keep in mind its several years old and there have been a lot of changes since then...
  17. well the EAV is caused by the issue with parenting the camera to the pivot... when you press escape to stop the game script, the pivot no longer exists but the framework camera still has it as a parent. also, as far as parenting the pivot to the controller, these two lines are setting the parent to nil then to the controller... pivot = CreatePivot(steampunk) --'steampunk is not an entity so its equal to nil' pivot:SetParent(controller) you could have just written it like this: pivot = CreatePivot(controller) as the only parameter to use is to set the entity parent As far as the EAV, you have to set the camera's parent to nil after the main loop; fw.main.camera:SetParent(nil)
  18. http://www.leadwerks.com/werkspace/page/tutorials/_/design/leadwerks-23-user-guide-r16
  19. havent tried it but just looking at the following line would seem to cause an issue: pivot = CreatePivot(steampunk) as 'steampunk' should be either the controller/character...
  20. he is moving/rotating the camera and not the object... I have sent you the modelviewer code in a PM
  21. Turn on the 'Show Physics' option in the editor by 'Tools>Options..>Display' and check to see if the house's physics body is aligned with the house's visual mesh. And cassius is correct, you do not need phygen for this. Delete the PHY file from the house's file directory and restart the editor. Open up the scene and try again. Confirm that the house collision type property is set correctly.
  22. Unless you were using the variable 'camera' somewhere else (as it wasn't shown in the code above), then adding that 'camera=fw.main.camera' would make no difference. Framework automatically creates cameras for all three worlds and does not require you to assign them to another variable for it to work.
  23. a material is not a texture... and the size of that image being drawn is essentially only 1 pixel with the values you are using... see DrawImage for details and dont free the image if you expect to see/use it again, just dont draw the image.
  24. well you can still learn these basics by using the editor - just look inside the class.lua script located in the Scripts folder to see how the basics commands are used for the property dialog.
  25. i am assuming you are using lua, so it should be: sceneBuildings:SetColor(Vec4(.5,.5,.5,.5),1) you know if you used the editor to create your scene, you could easily set these properties with the property dialog... just a suggestion.
×
×
  • Create New...