tipforeveryone Posted January 11, 2018 Share Posted January 11, 2018 function Script:Start() self.hinge = Joint:Hinge(--parameters--) self.hinge:EnableLimits() self.hinge:EnableMotor() self.hinge:SetFriction(30) end function Script:UpdateWorld() self.hinge:Release() --This make my game crash end I used Release() on joint:hinge in the past and remember it worked, not in 4.5 Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted January 11, 2018 Share Posted January 11, 2018 Some people have had crashes using "release". Here is a thread from last year and solution there was to hide first then release. Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted January 11, 2018 Author Share Posted January 11, 2018 It is sad... it does not work Note: self.hinge was created in Start() and worked fine Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted January 11, 2018 Share Posted January 11, 2018 Maybe Josh has a solution. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 15, 2018 Share Posted January 15, 2018 On 1/11/2018 at 1:29 AM, Thirsty Panther said: Some people have had crashes using "release". Here is a thread from last year and solution there was to hide first then release. This thread has nothing to do with joints dude. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 15, 2018 Share Posted January 15, 2018 I can tell right now your script will cause errors because you are releasing a non-existent joint after the first loop! It should be something like this: function Script:Start() self.hinge = Joint:Hinge(--parameters--) self.hinge:EnableLimits() self.hinge:EnableMotor() self.hinge:SetFriction(30) end function Script:UpdateWorld() if self.hinge~=nil then self.hinge:Release() --This make my game crash self.hinge = nil end end And it Leadwerks 5 it will work like this: function Script:UpdateWorld() self.hinge = nil end 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 15, 2018 Share Posted January 15, 2018 Unless you find a problem otherwise, the above is my explanation and I am moving this to programming. Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.