VicToMeyeZR Posted January 14, 2010 Share Posted January 14, 2010 Anyone have an example of the lua script for the animation of the models. Also, does the wiki have the bone names and requirements listed anywhere? I can't seem to find it. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Niosop Posted January 14, 2010 Share Posted January 14, 2010 There are no requirements for bone names or number of bones or anything. The only limitation I can think of is that a max of 4 bones can affect 1 vert. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 14, 2010 Author Share Posted January 14, 2010 So as long as you know the frame range for each animation, you can assign each animation to what ever you want then? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Niosop Posted January 14, 2010 Share Posted January 14, 2010 Ahh, from one model to another? Supposedly if the bone names are all the same you can. I haven't had a lot of luck with it, but others have I guess. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 14, 2010 Author Share Posted January 14, 2010 hmm.. Well hopefully someone will post a few hints as to how to call the animation sequences in Lua.. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 15, 2010 Author Share Posted January 15, 2010 whats the lua for the fmodf function in c++? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
macklebee Posted January 15, 2010 Share Posted January 15, 2010 math.modf Return the integral and fractional parts of the given number. > = math.modf(5) 5 0 > = math.modf(5.3) 5 0.3 > = math.modf(-5.3) -5 -0.3 If you want the modulus (remainder), look for the modulo % operator instead. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 15, 2010 Author Share Posted January 15, 2010 cool.. Thank you Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 15, 2010 Author Share Posted January 15, 2010 frame = math.fmod(AppTime()/35,frameend-framestart)+framestart it was math.fmod that I wanted. Thanks for your help Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 15, 2010 Author Share Posted January 15, 2010 @Rick.. Using your character thingoid if you assign the character to it, would the character lua code, then become the child of the character controller? I am wondering, because the animation sequences would be in the update() part of the character script, but trying to find the way to assign when key pressed play this sequence.. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
macklebee Posted January 15, 2010 Share Posted January 15, 2010 frame = math.fmod(AppTime()/35,frameend-framestart)+framestart it was math.fmod that I wanted. Thanks for your help ah ok... wasn't sure what you were trying to capture since i am not a c++... take a look at this link for reference... i have found it to be quite useful Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted January 15, 2010 Author Share Posted January 15, 2010 that one is much easier than the lua site. thanks also.. I call group:AddProperty("idle_start", PROPERTY_INTEGER, "", "Idle Start Frame") but when I try to reference that value, it always pulls the default value only? object.framestart = object:GetKey("idle_start", "450") Is this not the right syntax? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
macklebee Posted January 15, 2010 Share Posted January 15, 2010 well just guessing that the SetKey function is not actually setting the value, so when you do the getkey and doesn't find a key/value for idle_start, it will use the default value... easy way to confirm this is to not use a default value object.framestart = object:GetKey("idle_start") look at how environment_atmosphere.lua file sets the key/values initially then uses the getkey to grab the value based on the key Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.