Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. try turning off the grid snap in the editor... Tools>Options>Display>Grid Snap or change the grid size from 1.0 to a smaller number and leave the gridsnap on
  2. what are you using for the conversion Mike? you can have multiple textures on a single gmf... if you want some help send me a PM... if you are using UU3D, then when you open the model, you should have different groups listed... make sure each group has a texture associated with it under the Material heading... then just save as normal to gmf with 'multiple textures' selected as an option... then you just have to create the different material files for each texture with the file named after the texture and of course calling the texture out in the material file...
  3. the error is from you trying to load the viperscout which is a protected asset. it can only be used in the editor as an example. you have to buy it from dexsoft if you wish to use it outside the editor.
  4. The A* script that MG created is fantastic and much needed considering the lack of pathfinding solutions available in lua inherently.
  5. how do multiple functions from different scripts work with each other? like if you attached the animation script and the mover script together on one object, how would you differentiate between the two Pause functions? this seems alot more complicated than to just create one script which handles what you need.... and shouldn't that animation script be using actor:Draw() instead of Update()?
  6. http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/cpp/using-opengl-for-drawing-r19
  7. the new uu3d plugin for gmf automatically creates the mat file as well as convert textures to dds if needed.
  8. ah that explains the L3D comment in your blog... and it reminded us of L4D... which considering how much you play that game maybe that is an unconscious decision?
  9. macklebee

    Almost Android

    huh? i thought LE's lua was luaJIT as of 2.41?
  10. the wiki tutorial shows finding the bone and controlling it like an entity:http://www.leadwerks.com/files/Tutorials/CPP/Introduction_To_Animation.pdf
  11. And that right there is the one complaint I have against uu3d as it does not keep the model hierarchy for conversion to GMFs.
  12. well not exactly... its more related to where the engine.exe is located, but if you use the scripteditor then it is looking to run the engine.exe that should be located in the same folder as the scripteditor... unless of course you change the script editor's default file path for the engine.exe located in the Tools>Options dialog...
  13. are you talking about loading lua files? then use either 'require' or 'dofile' that are inherent lua commands that do not work with abstract pathing. if you are talking about loading materials, models, textures, etc, then you have to just use the path base on where the engine.exe/scripteditor is being ran from... for example: texture = LoadTexture("Materials/cobblestones.dds") where the engine.exe is located in the root directory that has a materials folder inside with the texture. also, note this is the LE3 forum not the LE2 forum
  14. what formats are you trying to convert from? fbx? obj? x?... the tools folder has converters for all of those... just drop the model onto the appropriate converter and it will convert to gmf. also, the downloads section has Arbuz's 3dsmax exporter which is supposed to be quite nice. also remember that you need a material file for every texture used on your model and the textures need to be DDS.
  15. the key to loading the standard scripted entities like the lights and atmosphere objects with a scene in c++ is this: //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1);
  16. you can already do this...http://www.leadwerks.com/werkspace/topic/381-scene-loading-example/page__view__findpost__p__5665
  17. Addhook in the standalone script or a object script works fine if there is no FlipHook() function in the standalone... but yeah the two together in the standalone do not play well together or a fliphook with an addhook in an object script... but to get around it you can just use an Addhook function in the standalone as well and it works with object scripts that have addhooks
  18. i assume its for doing 2d draw commands? you can do them three ways... 1) just set the FlipHook function in the initial part of the program function FlipHook() --or this works automatically without needing hooks.lua SetBlend(1) SetColor(Vec4(1,0,0,0.25)) DrawText("hello",50,300) SetColor(Vec4(1,1,1,1)) SetBlend(0) end 2) set a function with the hook command via "scripts/hooks" lua script function DrawStuff() SetBlend(1) SetColor(Vec4(0,1,1,1)) DrawText("hello",0,300) SetColor(Vec4(1,1,1,1)) SetBlend(0) end AddHook("Flip", DrawStuff) 3) and of course right before the Flip in the main loop note that the FlipHook function doesnt play well with the AddHook's function in the standalone for some reason... require("scripts/constants/engine_const") require("scripts/hooks") RegisterAbstractPath("") Graphics(800,600) fw=CreateFramework() fw.main.camera:SetPosition(Vec3(0,0,-2)) light=CreateSpotLight(10) light:SetRotation(Vec3(45,55,0)) light:SetPosition(Vec3(5,5,-5)) material=LoadMaterial("abstract::cobblestones.mat") mesh=CreateCube() mesh:Paint(material) ground=CreateCube() ground:SetScale(Vec3(10.0,1.0,10.0)) ground:SetPosition(Vec3(0.0,-2.0,0.0)) ground:Paint(material) light=CreateDirectionalLight() light:SetRotation(Vec3(45,45,45)) --add your own via hooks.lua function DrawStuff() SetBlend(1) SetColor(Vec4(0,1,1,1)) DrawText("hello",0,300) SetColor(Vec4(1,1,1,1)) SetBlend(0) end AddHook("Flip", DrawStuff) --[[function FlipHook() --or this works automatically without needing hooks.lua SetBlend(1) SetColor(Vec4(1,0,0,0.25)) DrawText("hello",50,300) SetColor(Vec4(1,1,1,1)) SetBlend(0) end]] while AppTerminate()==0 do if KeyHit(KEY_ESCAPE)==1 then break end mesh:Turn(Vec3(AppSpeed()*0.5,AppSpeed()*0.5,AppSpeed()*0.5)) fw:Update() fw:Render() -- or just add the 2d drawcommands here SetBlend(1) SetColor(Vec4(0,0,1,1)) DrawText("something",100,300) SetColor(Vec4(1,1,1,1)) SetBlend(0) Flip(0) end
  19. not sure if i understand the question... are you asking how to add a fliphook in a standalone lua program?
  20. 1) loadscene loads the model's mesh (with its material if it has one), script (if it has one), and PHY body (if it has one, if not creates a static one) 2) yes by collision 3) yes also please post programming questions in the appropriate forum board.
  21. i believe those are the same ones that are posted in the community tutorials that I linked above.
  22. look inside the community tutorials:http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/lua/
×
×
  • Create New...