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 / Picking up objects in Dbp

Author
Message
Roflcopter
14
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 15th Nov 2010 02:19
I was just wondering how i would go about picking up objects. I have 2 characters on screen and randomly spawning blocks. I need to figure out how to make both characters pick up the blocks, hold them while they move and then drop the blocks somewhere else.

Any help would be really good, i also put a copy of the code as an attachment.

Attachments

Login to view attachments
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 16th Nov 2010 13:40 Edited at: 18th Nov 2010 10:13
Probably the easiest way to do this would be to check if the player is colliding with the block, and if that is the case, you can glue the object to the player:



And to unglue it, use:

unglue object block_obj

TheComet

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 21st Nov 2010 21:29
dont know if u want to have the char click the block or not but
dirty and simple


A child's dream never dies.

Login to post a reply

Server time is: 2024-11-16 18:04:01
Your offset time is: 2024-11-16 18:04:01