-
Posts
3,946 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by macklebee
-
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
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. -
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
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. -
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
works for me... maybe check out the engine.log file and see if its loading correctly? -
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
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... -
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
why do you have two functions for CreateObject? and why are you not using the standard object functions? -
Script for Animating a Part of an Object **HELP**
macklebee replied to 02arnoldj's topic in General Discussion
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? -
does it look like this: http://www.leadwerks.com/werkspace/topic/5358-terrain-shadow-bug/
-
+100
-
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...
-
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?
-
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
-
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.
-
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...
-
Bloom Post fx causes my script to give errors
macklebee replied to karmacomposer's topic in Programming
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) -
Bloom Post fx causes my script to give errors
macklebee replied to karmacomposer's topic in Programming
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... -
http://www.leadwerks.com/werkspace/files/category/22-demos/
-
basic 3rd person camera
-
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
-
http://www.leadwerks.com/werkspace/topic/3226-camerapick-with-bodies/#entry29657
-
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
-
To lightmap or to not lightmap - that's my question
macklebee replied to karmacomposer's topic in Game Artwork
oh its been a bug for so long i thought it was a feature by now... -
To lightmap or to not lightmap - that's my question
macklebee replied to karmacomposer's topic in Game Artwork
less than that I would say... http://www.leadwerks.com/werkspace/topic/5358-terrain-shadow-bug/ -
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
-
SOLVED - Exporting from 3D World Studio not going right
macklebee replied to karmacomposer's topic in Game Artwork
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... -
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.