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.

2D All the way! / need good animation ideas.

Author
Message
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 1st Jan 2009 06:36
ok so i have a ok way of doing it but it involves deleting the sprite then the movement has to be at the bottom (((
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Jan 2009 23:58
Quote: "it involves deleting the sprite then the movement has to be at the bottom"


What?

Can you reword that?

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Jan 2009 00:32
lol ya.

the way i do the animation is everytime the animation frame changes, i delete the sprite cuz if not i have the old on in the old position always there.

because of that i have to put my movement code at the bottum all the time and the sprite code at the top(so that when the sprite gets deleted there isn't anything refering to that sprite after before it makes it again.)

i was wondering if there was a better way
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 2nd Jan 2009 00:43
You could just use the SPRITE command again to give the sprite a new image. If you have DBPro, you might also be able to use the command CREATE ANIMATED SPRITE.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Jan 2009 06:52
but then when it goes back around it will fail won't it? because if i have it trying to make that sprite again at the begining then that sprite would already exist
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 2nd Jan 2009 14:46
In dbpro you can use the sprite-command with always the same ID which is the usual method for repositioning it or changing the image (at least I think so, afaik there is no command like 'position sprite', and I also don't know how it's handled in DBC). However, as bmaczero pointed out the probably best method is using create animated sprite.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Jan 2009 22:05
if i had dbpro haha a create animated sprite command would be very helpful. the sprite command from your explaning in dbpro and classic are the same and thats how i'm doing it just i have to delete it when i change the image number.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd Jan 2009 19:10 Edited at: 3rd Jan 2009 19:11
Ah, I think I know your problem. Do this to change the sprite's image:

sprite [SpriteNo],sprite x([SpriteNo]),sprite y([SpriteNo]),[NewImage]

Replace [SpriteNo] with the number of the sprite. Replace [NewImage] with the new image number.

You do not need to delete the sprite or anything beforehand.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Jan 2009 01:59
i have the sprite command in my loop and your "newimage" in a variable and i just change that variable to change the animation. so are you saying to instead of have the sprite command at the begining of the loop put it every place that animation is used?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Jan 2009 02:39
No, you just use it once per loop. Sorry if I confused it more, I was trying to get across that you do not have to delete the sprite.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Jan 2009 03:44
i Have it at the beginning of my loop but if i don't delete then I will have a Image of the last frame of animation behind the current frame.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Jan 2009 04:45
Could you possibly post the code? Unless this is working for you now, of couse. As long as it works I don't want to confuse the issue anymore.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Jan 2009 05:57
i was just about to say do you want to see the code haha i was going to edit the post but forgot

and it is working its just kinda frusterating as i can't put anything after the movement code.





there you go.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Jan 2009 16:01
Eh, that's unusual. DELETE SPRITE seems to be working for you, though, so I guess just stick with that.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Jan 2009 16:24
ok well thanks anyways

Login to post a reply

Server time is: 2024-04-25 01:56:28
Your offset time is: 2024-04-25 01:56:28