Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. local minigun = LoadMesh("abstract::minigun.gmf") object.barrels = model:FindChild("barrels") Since you are loading the mesh just be aware that this does not load the minigun's object script. The next line does not work because this is a game script and not an object script. So 'object.barrels' means nothing and model is not referencing the minigun. If you are trying to find the child mesh in the minigun GMF then you have to reference the minigun local minigun = LoadMesh("abstract::minigun.gmf") local barrels = minigun:FindChild("barrels") You should still post the model to confirm that you have mesh hierarchy in the GMF. Also this can be verified in the modelviewer and you can do a logic check to make sure its found by checking to make sure barrels is not equal to nil.
  2. Without seeing the actual model and script in question, all anyone can do is guess at what you are doing wrong. The windmill model this works correctly for... maybe there is a problem with your model. If you really want someone to help you, then zip up the model/script and post here.
  3. works for me... maybe check out the engine.log file and see if its loading correctly?
  4. well here is just a simple version that uses the current standard object functions to show how to turn the windmill blades: require("scripts/class") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) group=grid:AddGroup( "Windmill" ) group:AddProperty( "spinspeed","|0,4",PROPERTY_FLOAT,"Spin Speed") group:Expand(1) end function class:CreateObject(model) local object = self.super:CreateObject(model) object.blades = model:FindChild("windmill_blades") object.model:SetKey("spinspeed","1") function object:Update() if self.blades~=nil then self.blades:Turn(Vec3(0,tonumber(self.model:GetKey("spinspeed"))*AppSpeed(),0)) end end end granted due to the mesh heirarchy, about the only way this is useable is to have it converted directly from fbx... majority of the people here that use uu3d for conversion lose out on this nice little feature...
  5. why do you have two functions for CreateObject? and why are you not using the standard object functions?
  6. well if the animations are all in one file then you have to tell LE what frames are doing what animation... if the animations are separate files with similar names and loaded using LoadAnimation then you can probably make a generic animation script to work for any object. But just starting out with LE, you should probably focus on just understanding how LE works instead of trying to optimize a script to be used in any situation... Go through the link Josh provided and read it. Then read it again until you understand how animation works in LE. and then compare it to what Chris just provided. You need to realize there are two engines at the moment. LE2.5 is the evaluation version that you can currently download. LE3 is the rewritten engine that has not been released yet. 'actor:Play' & 'actor:Draw' are from LE3. yes yes You and I assume your partner Mince have posted questions about the windmill model. That is not using animation sequences to rotate. The script is simply rotating a child mesh - blades- of the model. But I am curious on where you got that model from?
  7. does it look like this: http://www.leadwerks.com/werkspace/topic/5358-terrain-shadow-bug/
  8. where did you get the windmill model from? that hasn't been around since 2.3 first came out... which is also using very old inherent scripts and multi-state lua in the beta version of the LE2.3 editor in that video so not too surprised that it doesn't work in the latest LE2.5 evaluation version...
  9. adn is just a material editor and the modelviewer, like its name describes, just allows you to view a model... so I really don't understand the question being posed here?
  10. Well you would have to use it in one of the default object functions that get called upon every flip, like update. The current default directional light script only has the object functions for SetKey and GetKey, so you would have to add that yourself. As for 'self' in this instance, it is the same as saying object and you would use it inside an object function. function object:Update() self.light:Turn(Vec3(AppSpeed()*0.5,0,0)) end
  11. i do all that with models w/ scripts - it works even if convoluted. i think its referring to multiple statements here from several of the new LE3 fanboys (that believe that LE3 will magically make a game for them with one click of a mouse) that we don't need the quality renderer from LE2 because none of us are making AAA games. But like you said and what Ken is alluding to as well, the renderer was exactly what drew me to LE in the first place. I look forward to LE3 getting up to the same level of graphics/features as LE2.
  12. huh? bugs need to be fixed or don't have any bugs? I have seen you post this before and its even been stated to you a couple of times that LE2 can already load a scene and all of its entities with one command - Its called LOADSCENE()... ffs... these statements are meaningless as you have not actually tried using LE3 or figuring out what your workflow will be or much less know if you will be able to make a game... my guess if you cannot do anything with LE2, i really do not see you doing much better with LE3 no matter how much Josh tries to make it for "artists" or as the next version of FPSCreator... As far as plugins for the editor, Josh has stated repeatedly there is no plugin feature. for the rest... tldr...
  13. also, just an fyi... in bmax you don't have to state the framework commands like: fw.renderer.SetBloom(1) they can be written like this: SetBloom(1)
  14. Works just fine here, so my suggestion is to use the LESDK utility to make a clean LE folder. So my guess is that you apparently still have an older modified shader pak somewhere...
  15. http://www.leadwerks.com/werkspace/files/category/22-demos/
  16. this page alone in the wiki > than the whole of your link... way too much clicking back and forth on that forum page when i can just look at the information on that wiki page using a mouse scroll
  17. http://www.leadwerks.com/werkspace/topic/3226-camerapick-with-bodies/#entry29657
  18. if MouseHit(1)==1 then LoadMesh (blah blah blah) end look at MouseHit(#) where (1) is Left mouse click, (2) is Right mouse click, and (3) is Middle mouse click. the values defined in the keycodes.lua script can be used in the MouseHit/MouseDown commands... if MouseHit(MOUSE_LEFT)==1 then LoadMesh (blah blah blah) end
  19. oh its been a bug for so long i thought it was a feature by now...
  20. less than that I would say... http://www.leadwerks.com/werkspace/topic/5358-terrain-shadow-bug/
  21. look at the template.lua file located in the scripts folder as it gives the general layout for the 'object:ReceiveMessage(message,extra)' function as well as all the standard LE lua object functions, but essentially its just: function object:ReceiveMessage(message,extra) if message="use" then --'do something here' else self.super:ReceiveMessage(message,extra) end end
  22. due to issues with newton bodies with scaling in LE2, i would suggest that you just either create your objects to scale in 3dws to begin with, or worse case use uu3d to scale it down...
  23. If you are making your one model that big you are doing it wrong as you lose any hope of using occlusion culling in LE. The scene should be broken up in pieces and saved as gmf's individually then aligned in LE's scene editor.
×
×
  • Create New...