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 / Animating limbs made from loaded objects?

Author
Message
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 29th Apr 2007 22:29 Edited at: 29th Apr 2007 22:37
Well, I have an object (.3ds file) that has 10 frames of animation.
I have it attatched to the player as a limb.

Here is the code (Using my common test project):


Won't work unless you have the .3ds file.

Attatched is the .3ds file (I don't care if you steal it, there is no license).

Put it in your projects folder for the game to work.

How can I get the limb to play like it would if it was just an object?

EDIT: I just tried removing the hide object command on the sword, didn't even animate the sword.

How can I get objects animating?

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.

Attachments

Login to view attachments
Jerok
19
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 30th Apr 2007 02:29
Try positioning the sword at the position of an existing limb.
Try:

This should fix the problem.(I have not tested it.)

I think the problem was that when you make the object a limb it creates a limb that is no longer an object.

Also when creating limbs for objects you can delete the object you used for the limb. (7500 in you code, 8000 in mine)
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 30th Apr 2007 04:14
That would work, except it isn't animating.

The sword isn't animating at all no matter what. I animated it in Milkshape 3d, and tried it as .x and as .3ds.

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 30th Apr 2007 04:32 Edited at: 30th Apr 2007 04:32
Once you make a mesh from the sword and add it to the object as a limb, it loses all of its animation properties. I made something that may allow you to animate it manually through DarkBasicPro here: Set OBject Keyframe (Animation Functions).

Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 30th Apr 2007 05:24 Edited at: 30th Apr 2007 05:25
Hrmm. So all I need to do is make a sphere with a size of 0.5 so he sword goes over it, use something like what is following?:
lx# = limb position X(1)
ly# = limb position Y(1)
lz# = limb position Z(1)

do

Position object 7500, lx#, ly#, lz#
if controlkey()=1 then play object 7500, 1, 10

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 30th Apr 2007 11:39
Well, I tried what I posted earlier, but apparently I was being stupid and wasted an hour trying to use "Limb angle X" instead of "Limb direction X", but now the sword works with the player, but it still does not animate my sword.

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 30th Apr 2007 15:56
Hallo friends....if you have any animated object and you position it at x,y,z of other object or object`s limb, it works perfectly.


if you fail, I will send a code example... Greetings

oh my god
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 1st May 2007 01:14 Edited at: 1st May 2007 01:14
I have the sword attached to the limb working fine, except it won't animate when I press control.

Here is a really simple code that does not work.


The sword has exactly 10 frames of animation also.
Can anyone help me get objects animating?

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st May 2007 02:38
I would like to help you really, but the sword has no animation at all.I could animate for you in my 3D program but I don`t know what kind of animation you prefer.

One more thing...this is not the case, but you had better converting 3ds to .x files... some of 3ds files make stranges error

make sure the sword you had is animated, and try to send it again.

oh my god
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 1st May 2007 08:11
It isn't animated? It is animated in milkshape.

Great, so Milkshape decided that it doesn't like to export animations anymore?

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.

Login to post a reply

Server time is: 2024-11-25 19:56:20
Your offset time is: 2024-11-25 19:56:20