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 animation help please

Author
Message
DarkComplicated wtf
13
Years of Service
User Offline
Joined: 6th Oct 2010
Location: NARNIAAAA!!!!!!
Posted: 29th Nov 2010 23:29
so im trying to append animation to my little zombie thingamajiggies and i keep getting errors like "severe exception" or "cannot append animation"
heres my code
loading zombies
now heres the collision code

can you tell me what im doing wrong.....that has to do with appending
anyhelp appreciated thanks

I'll make Halo look like poke'mon!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Dec 2010 22:01
In the first batch of code, make sure your object numbers are what you want them to be.

You have

for zombien=0 to zombie where zombie=40
load object "models/zombiemove.x",zombien + zombie
etc. etc.

So just make sure you want your objects in the range of 40 to 80 which is a count of 41 objects (in case you only meant there to be 40).

You are also just saving the object animation from each of the objects loaded. You are not saving the entire model - just the animation for each model you are loading with:

save object animation "models/zombieattack.x",zombien + zombie
save object animation "models/zombiedie.x",zombien + zombie


This is setting up your problems for the second batch of code.

The following is going to cause some real problems:

append object "zombiedie.x",zombien + zombie,frames+1

Earlier you saved zombiedie.x over and over again (unless this one is not in the models folder) replacing it each time with the animation data of zombiemove.x . This in itself is part of the problem. When you attempt to append object "zombiedie.x" , you are trying to append an object that doesn't exist as an object, but only as animation data.

What I think you are trying to do, and correct me if I'm wrong, is to get the animation data from 2 models (die and attack) and apply those animations to 40 in game objects. Is that correct?

If so:

1. Which models have which animation that you want to apply?
2. Are the 40 in game models different from the source animation models?
3. If they are different, are they the exact same model except without animation?

Enjoy your day.
DarkComplicated wtf
13
Years of Service
User Offline
Joined: 6th Oct 2010
Location: NARNIAAAA!!!!!!
Posted: 13th Dec 2010 20:10
actually the point of it was theres 40 zombies mass loaded with the random generator
when im in the jeep and hit them they go from walking to falling over dead and when im not in the jeep i want them to go from walking to attacking me
and i think i may have realized what ive been doing wrong but just go ahead and add anything else you gotta say

I'll make Halo look like poke'mon!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Dec 2010 00:47
Quote: "add anything else you gotta say"

I just gotta say this!

If you have a single object that has all of the animations stored in it, then you can just load that object multiple times. You can play sections of the animations by indicating the to and from frames.

If you want to append a particular animation from an object stored on disk to an already loaded object, then use APPEND OBJECT



If you save animation data from a loaded object using SAVE OBJECT ANIMATION - this only saves the animation data, not the object - you should be sure to save it with a DIFFERENT name than an existing object. Choose an extension that is meaningful to you like .anim or .dat that tells you this is animation data. Don't use .x .

To add this saved animation data onto an already loaded object, use APPEND OBJECT ANIMATION



Enjoy your day.
DarkComplicated wtf
13
Years of Service
User Offline
Joined: 6th Oct 2010
Location: NARNIAAAA!!!!!!
Posted: 25th Jan 2011 15:03
thanks this helped, i ended ditching the game and making a different one but now i think i'll go back and try again

I'll make Halo look like poke'mon!
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Jan 2011 23:19
You're still new so don't worry about ditching projects. As long as you learned something from them you're making progress.
If you still like your old ideas, I'd recommend scrapping the old code and starting from scratch. I haven't even read your code but when you're a beginner you learn new and better ways to do things so fast that it's not worth hanging onto old code, except for posterity.


Everything worthwhile requires effort.
DarkComplicated wtf
13
Years of Service
User Offline
Joined: 6th Oct 2010
Location: NARNIAAAA!!!!!!
Posted: 5th Feb 2011 23:01
yah thanks i actually used that monster hunt tutorial to learn how to do most of what i wanted to learn about and i finished it and now im working on my own spin off of the game with the code i've learned my only problem right now is the damn airstrike >.< it kind of sucks cuz im not in my game design class anymore since the trimesters id over but whatever i can figure it out with help from this site like i did before

I'll make Halo look like poke'mon!

Login to post a reply

Server time is: 2024-04-20 06:26:57
Your offset time is: 2024-04-20 06:26:57