Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Getting object position / placing another object at its position with it.

Author
Message
Tucker
14
Years of Service
User Offline
Joined: 20th Jun 2010
Location: Earth Prime
Posted: 15th Nov 2010 03:08 Edited at: 15th Nov 2010 03:10
Hey guys, I've got a small problem that I'm sure someone here will be able to help with.
I am setting it up so that when the player is touching an object, and presses space, it 'attaches' the object to directly in front of the player until they let go of the spacebar.
I tried the glue/unglue with no luck,
but i figured just simply repositioning the object to the players co ordinates would work the way I want it to.
So what I'm asking is - How do I get the players co-ordinates, and position an object at those co-ordinates so it moves with the player etc.

Any help would be much appreciated!
If you need my code, just ask.


Hey look at that!
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 15th Nov 2010 13:11 Edited at: 15th Nov 2010 13:18
position object [pickedupobjectnumber], object position x(playerobjectnumber), object position y(playerobjectnumber), object position z(playerobjectnumber)

you may need to rotate the picked up object too

bear in mind that this command will position the picked up object at the player object's origin. There are a couple other ways to do it but I think adding a limb to the front of the player object and then using GLUE OBJECT TO LIMB would be easier

This is not the Sig you are looking for....

Login to post a reply

Server time is: 2024-11-24 09:54:01
Your offset time is: 2024-11-24 09:54:01