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.

DarkBASIC Professional Discussion / Is there a better way to do this???

Author
Message
GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 17th Jul 2012 10:13
Ok, So I needed the Pick Object command. Last game I just hard coded mouse bounding boxes... But this one, I want to click on things, and set it up proper...

Ok, brought my model into game. Needed click regions. However Pick Object doesn't support limbs... So when I walk the model and get the click regions, I make object cube so there is a object there to click on. However I dont want to see these boxes, I just want to click on them. I I execute Hide Object, however Hide object takes the object out of the pick list. So I set Object Alpha myobj, 0 on them, and now they are in the pick list, and they are not visible...

All is working good, but was there an easier way to do this?
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 17th Jul 2012 11:15
you could use

MAKE OBJECT FROM LIMB Object Number, Second Object, Limb Number

make objects out of the limbs, delete the original and then you can use the pick object command to select them.

unless there is some reason you want the limbs to remain limbs.

Sometimes I like to use words out of contents
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jul 2012 12:23
Just converting what Kezzla said to some code:



It hides the original object, creates new objects from every limb, and then glues those objects to the original limbs. When your model moves (animation), the glued objects will move with the limbs.

This doesn't work with bone animation.

TheComet

Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 17th Jul 2012 12:51
cheers comet.

a strange co-incidince...
I just found this plugin which has pick limb commands in it.

http://forum.thegamecreators.com/?m=forum_view&t=175969&b=18
sounds like just the ticket.

Sometimes I like to use words out of contents
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jul 2012 13:03
Nice find Kezzla! Now I'll be thinking much more about Donkey Kong when I program...

TheComet

GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 17th Jul 2012 17:36
If I use Make Object From Limb will the animation channel for the Limb stay intact?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Jul 2012 21:36 Edited at: 20th Jul 2012 22:43
I,m in the wrong thread.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-08 00:07:48
Your offset time is: 2026-07-08 00:07:48