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 Discussion / appending more than one object

Author
Message
Dragoon
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: Spijkenisse, Nederland
Posted: 12th Jan 2004 15:53
hey guys!

I have a really annoying problem. I don't know how to append more than one object. For example:

I want a figure to move, attack and die, but how do I append those object? I first thought:

append object "objectname",objectnumber,startframe

but as soon as I get more startframes I get errors.

How do I solve those?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Jan 2004 19:40
Quote: "(Append Object) ~ This command will append all animation data from the 3D object file into the specified object. The new animation data will begin from the start frame specified up to the length of the files animation data. Ensure that the 3D object being appended uses the same limb names as the original object, otherwise the load will fail. The parameters should be specified using integer values"


From that I can tell you that you CAN have multiple appends.

What you need to do is go into the animator you used, and write down the number of frames there are in each object...

Then, starting from the base object, and moving in any direction you like, write down running totals of the frame numbers, ie:

original object has frames 1 to 25
move has frames 1 to 12
attack has frames 1 to 32
die has frames 1 to 9

then, you use a running total to keep track of them;

original object, 25
move object, 25 + 12 = 37
attack object, 37 + 32 = 69
die object, 69 + 9 = 78

Then, do your append object commands in that order, using those start frames.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dragoon
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: Spijkenisse, Nederland
Posted: 13th Jan 2004 09:51
I seem to be getting the point now...

Don't know if you have DarkMatter, but I have tried with the Alien Hivebrain model and it said with the last frame "Runtme error at line 5. Append frame must be greater than total frame count."

When I delete the line it says the same thing, only for line 4. Here's my code, maybe I've done something wrong with counting the frames or something.



But thanks for explaining, Jess.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 13th Jan 2004 10:11
Quote: "load object "alien hivebrain\h-alien hivebrain-static.x",1
append object "alien hivebrain\h-alien hivebrain-move.x",1,50
append object "alien hivebrain\h-alien hivebrain-attack1.x",1,75
append object "alien hivebrain\h-alien hivebrain-die.x",1,125
"


( no, I don't have DarkMatter ) From that, I am assuming that the original model has animation frames from 1 to 49, then the second one has frames from 1 to 26 and the third has animation from frame 1 to 50 and the forth has fromes from 1 upward ( it doesn't matter how many the last one has )...

If that is correct, then you are doing it right, if not, then you have made an error.

If the first model has frames from 1 to 50, then you need to append the next model on the end starting at frame 51, then if that were to have 10 frames of animation, you would append the next model on at frame 62 ( notice i am adding the amount of frames plus one ).


Hope I Helped...

BTW, that error, means that you are trying to append the object on at a frame that is already in use by the previous model.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dragoon
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: Spijkenisse, Nederland
Posted: 13th Jan 2004 11:59
I made a mistake here.

Quote: "original object, 25
move object, 25 + 12 = 37
attack object, 37 + 32 = 69
die object, 69 + 9 = 78
"

From this I thought I had to add the frames of the object I'm appending to the frames of the previous object.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 13th Jan 2004 16:13
Yes, sorry, I made the error there, you do, but you then need to add one to that, so that you get a unique value that isn't in use already...

Basically it's add the number of frames of the previouse object, add one, that's your number.
etc etc.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dragoon
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: Spijkenisse, Nederland
Posted: 14th Jan 2004 13:06
I got it working now. Thanks Jess.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 14th Jan 2004 13:23
Great! Glad you got it to work fine...

Gald to have helped also...

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-06-05 20:11:32
Your offset time is: 2025-06-05 20:11:32