Jump to content

Recommended Posts

Posted

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.

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Posted

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Posted

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Posted

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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

frame = math.fmod(AppTime()/35,frameend-framestart)+framestart

it was math.fmod that I wanted.

 

 

Thanks for your help

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Posted

@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..

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Posted

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

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

that one is much easier than the lua site. :angry: 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?

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Posted

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

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...