Russell Posted May 19 Posted May 19 For a long time to this moment, I haven't been able to get a door to go up and down with an elevator inside Leadwerks. The elevator is the parent, and the door, like the walls and ceiling, are children of the elevator. All the elevator elements have an empty script assigned. The door has the Door Script. And yet, when we activate the elevator, the door stays in place. This is a problem I've been trying to solve for a long time in Leadwerks, but haven't been able to. I've attached a ZIP with a simple example of the problem. Could anyone tell me if there's any way to solve it? Many thanks team!!! PuertaAscensor.zip Quote
Josh Posted May 19 Posted May 19 You are supplying nil as the parent for the joint. The parent should be the elevator object instead: self.joint=Joint:Slider(position.x,position.y,position.z,pin.x,pin.y,pin.z,self.entity,nil) 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Russell Posted May 19 Author Posted May 19 3 hours ago, Josh said: You are supplying nil as the parent for the joint. The parent should be the elevator object instead: self.joint=Joint:Slider(position.x,position.y,position.z,pin.x,pin.y,pin.z,self.entity,nil) Thanks for answer Josh, but I don't understand how can i solve this changing nil value from the script... This SlidingDoor.lua script used for the Door and for de Elevator is the original one that came with Leadwerks, and I don't know how to fix it so the door follows the elevator. Quote
Solution Josh Posted May 19 Solution Posted May 19 I have not coded anything in Leadwerks 4 for a long time, but I think something like this would work: self.joint=Joint:Slider(position.x,position.y,position.z,pin.x,pin.y,pin.z,self.entity, self.entity:GetParent() ) 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Russell Posted May 19 Author Posted May 19 6 minutes ago, Josh said: I have not coded anything in Leadwerks 4 for a long time, but I think something like this would work: self.joint=Joint:Slider(position.x,position.y,position.z,pin.x,pin.y,pin.z,self.entity, self.entity:GetParent() ) I love you Josh!!!!! It worksssss!!!!!!!! FINALLY IT WORKS!!! This bull**** has been driving me crazy for a long time... I've modeled trains with the script where the doors hover when the train move out... This works now!!! Thanks so much!!! Now I can upgrade my elevators!!! Many many thanks!!!! 1 3 Quote
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.