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.

Dark Physics & Dark A.I. & Dark Dynamix / How to move object with mouse?

Author
Message
bLuEkEeZZ
15
Years of Service
User Offline
Joined: 22nd Dec 2008
Location: Philippines
Posted: 3rd Jan 2009 04:51
I have a problem regarding moving the object using my mouse sprite. I'm creating a block-stacking game similar to uno stacko. Here's the picuture below:

http://i34.photobucket.com/albums/d101/bLuEkEeZz/unonga.jpg

I have 45 objects (blocks) and i got to choose which block i want to pull-out. And here's my code, but it's not right coz the block doesnt move where my mouse goes.




I'm using windows vista, C++ 2008, Dark GDK and Dark physics.

-----------------------
rEaL NoOb
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Jan 2009 12:11
Have a look at this link, it shows how to make the pick object command in DBPro use the movement in DPyX.


http://forum.thegamecreators.com/?m=forum_view&t=130797&b=6

Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 4th Jan 2009 00:13
hay HowDo

Here is what I just came up with to see how what you made works, I may even test this with my Rube Goldberg maker, of which uses the pick object command as well as DP ray casting.

is that ok HowDo?



soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Jan 2009 13:27 Edited at: 4th Jan 2009 13:31
@sindore,

one thing you will find is that every time you pick the object it will reset its z value, that bit I never worked out how to do.

edit
don't forget to up the value in this line.



plus this is the old pick object code.

Dark Physics makes any hot drink go cold.
bLuEkEeZZ
15
Years of Service
User Offline
Joined: 22nd Dec 2008
Location: Philippines
Posted: 12th Jan 2009 14:54
@ HowDo

thanks alot, i finally dragged my object though not smoothly. Btw, i have another problem which i posted last December 29, 2008. But still no replies. I need some answers please help.

I dunno if that's the reason why i cannot compile my game to RELEASE mode. Because whenever i compile my game to relese build, then the game runs. At the moment the window was shown it crashes. I dunno why, it started when i first use DPhysics.

Here's the link to my forum:
http://forum.thegamecreators.com/?m=forum_view&t=142343&b=30

Thanks in advance... More Power!

-----------------------
rEaL NoOb

Login to post a reply

Server time is: 2024-11-24 18:24:52
Your offset time is: 2024-11-24 18:24:52