Jump to content

Object moved


Recommended Posts

Well hello there!

I would like to make a forklifter job, which basicly needs to bring and take crates. But why I really ask for help that I want to make a protection to push away the boxes from their original position, where I spawned them. When the player gets in the forklift, a marker appears up the box which you need to take. This protection would be the next: once the box is pushes its position changes, than take the marker after the box (delete the old marker than create the new to the new cordinate). I tried to do that with getElementPosition, but it isn't works when I pushed the box with the forklift, but for a test I made a moveObject for the selected box and when the crare moves in that way, the getElementPos worked. Can you please help me how could I watch the moving of the box when I push with the forklift?

Thank you for your help!

Regards, Stanley.

Link to comment

You should check if the forklift entered the marker where the box is in, if it's in there attach the box ( attachElements ) to your forklift, then set some elementData or add it in a table ( boxes [ vehicle ] = boxObj; ). Once it hits the delivery marker, check its data or the table and finish the job. :P

Link to comment

Thank you for your reply. I know how to move the box and I don't need to take care when it's in move. I want to know where is it after I pushed it from its spawn place. It this case I didn't do anything with the box (I thought that the box is already ot the floor, but its position is not as same as where I put).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...