Gabriel Posted October 25, 2011 Share Posted October 25, 2011 Hello, Someone explain to me why this code does not work completely? function class:CreateObject(model) local object=self.super:CreateObject(model) local timer1 = 0 local ani = AnimStart local source1 = CreateSource(sound1) function object:SetKey( key, value ) --Notify(key , " - " ,s value) if key=='animationseq' then v=tonumber(value) if v>=0 and v <=15 then AnimationSeq=v AnimStartNext = AnimationStart[v] AnimEndNext = AnimationEnd[v] --Notify(AnimStartNext) --Notify(AnimEndNext) else Notify("Valeur animation 0-15") end end if key=='animationspeed' then v=tonumber(value) if v>=0.01 and v <=3 then AnimationSpeed = v else Notify("Valeur pous animation Speed 0.01-3") end end end ..... To be more precise it works, but I feel that the function does its ancestor called over the scene. When I fontion SetKey how everything returns to normal but if the property but not much changed in the basseclass. PS: LUA code is associated with a 3D object gift I wish I could change some properties. Gabriel Quote Link to comment Share on other sites More sharing options...
Gabriel Posted October 25, 2011 Author Share Posted October 25, 2011 humhum, je dois bien avouer que ce n'est pas très claire, même pour moi google traduction Quote 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.