Jump to content

Recommended Posts

Posted

Hello all,

 

Leadwerks newb here trying to animate the crawler model. I've followed along with Jorn's tutorial here (

), but can't seem to get it work the same way. The crawler when I push run looks like he is frozen in attack mode. After looking at the SimpleAnimation.lua script I think the settings are hard coded in, this is off a fresh install from steam. For parameters I'm using speed of 1 and sequence of 0 which should be idle according to the model editor.

 

Can someone verify this default script to make sure it is right?

 

Thanks!

 

 

SimpleAnimation.lua

 

Script.Speed=1.0--float

Script.Sequence=0--int

 

function Script:Draw()

self.entity:SetAnimationFrame(8,1,4)

--local t = Time:GetCurrent()

--self.entity:SetAnimationFrame(t/100.0*self.Speed,1,self.Sequence)

end

Posted

if you uncomment the two lines and comment out the first SetAnimationFrame command you will get a continues animation of 1 sequence.

Script.Speed=1.0--float
Script.Sequence=0--int

function Script:Draw()
local t = Time:GetCurrent()
self.entity:SetAnimationFrame(t/100.0*self.Speed,1,self.Sequence)
end 

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