Jump to content

Recommended Posts

Posted

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.

Ascensor.thumb.JPG.98e111d8c73f02694ac9f4a01f985ece.JPG

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.

PuertaInmovil.thumb.JPG.06ac4893946a2bd6b531b4ca0a30a82b.JPG

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

Posted

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)
  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

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

  • Solution
Posted

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() )

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
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!!!!

  • Like 1
  • Haha 3

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