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 GDK / hi, once more, i have a question :)

Author
Message
psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 7th Apr 2008 04:46
hey there guys, i have one more question well actually two, first i want the player to be able to pick objects up, i know there is a method called glueObjectToLimb or something but i want the object to be picked up when the return key is pressed, but all the objects will be pickable (is that how u say it? :p ) so i want the player to aproach the objet and then press return and the objet will then be lifted how can i do that, thanks and second, is there a way i can trigger an audio or video sequence? thanks
psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 7th Apr 2008 10:01
ok guys, an addition to the first question, i imported a guy from fps creator, and and axe from fps creator too, and then i apply the dbGlueObjectToLimb method, and the axe does glue to the limb motion, but not to the limb itself, i mean if the left arm moves forward the axe moves forward too, but the distance between the arm and the axe is a lot, what can i do to make the distance 0? so it will actually look like the axe is on the hand of the the guy? thanks
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 01:26
Figure out the Offsets from the base model.

Place model at 0,0,0
Now make code that places the axe at 0,0,0 also, but allows you to move the axe around, up, down, forward, back, roate on each axis etc... and make sure you are always displaying the position and angles of the axe. When you get it presumably in the hand of the model, write down the positions and angles of it. Then in your game, load model to 0,0,0, position axe to your angles and positions you wrote down, then glue object to that hand limb.

TA DA

psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 03:04
hey thanks a lot, i`m not sure i follow, i think i done what you said, first i did was set the offset of the limb at 0,0,0, and then:
dbPositionObject (8(axe), 560,8,200);
float px=dbLimbPositionX(40(model),3(leftarm);
float py=dbLimbPositionY(40,3);
float pz=dbLimbPositionZ(40,3);
dbPositionObject (8(axe),px,py,pz);

and i played around with that for a while until the axe was on the hand then i glued it with dbGlueObjectToLimb (8(axe),40(model), 3(leftarm));
but then the axe would go far away
thats what you meant?
or didnt i follow you?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 03:19
No - I didn't mention lLimb position once.

I meant move the axe so it LOOKS like its in the "model's hand"

Then take the AXE's Position and Angles and record them on paper.
go into you program, move the MODEL to 0,0,0 and position the AXE exactly how you did during the position experiment.

(It should look like its in the model's hand)

THEN glue to the limb (the hand) you just positioned the AXE in.

That's it. If I'm explaining badly - let me know - I might me overlooking something.

also, the http://code.google.com/p/ironinfantrydbpro/ demo I did - its in dark basic (but comes with EXE - its a playable demo kinda) If you look in the helicopter (IIHeli.dba file, you'll see I used glue to attach the cockpit to the inside of the heli.

Download it and have a look-see.

psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 03:30
ok mate thanks, i`ll give it a go, sorry for not catchin it up the first time i`m kind of stressed up right now thanks :
psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 04:16
ok i moved the axe to the hand of the model but how do i know which coordinates are those? so i can write them down ?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 04:35


Something like that.

psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 04:53
thanks mate
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 05:01
You're Welcome - code is starting to look decent. Try to lose the hardcoded ID's once you get your head around things. You're making progress, I can tell.

psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 05:06
thanks mate, btw i know how to make a model start from a single frame, but how do i make it stop at another frame without reaching the last one?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 05:07
Timer based animations... and remember animation frames are FLOATS! So a 1.5 is a valid frame!

Search that one - I have already written some very detailed posts on that subject. Search: Timer Based Animation ans maybe a few other creative search phrases along the same lines

Crashing... Good night Bro...

psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 8th Apr 2008 05:11
thanks bro i`ll look into it gn

Login to post a reply

Server time is: 2024-09-29 17:20:53
Your offset time is: 2024-09-29 17:20:53