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! / sprite animation

Author
Message
lokatsis
21
Years of Service
User Offline
Joined: 11th Feb 2004
Location: greece
Posted: 25th Jun 2004 16:54
hi im trying to make animation for my sprites. i have a default animation and when i press the upkey the first animation is deleted and the second is desplayed and when i dont press the upkey the animation will return to the default. the problem is that when it returns to the default animation the second animation somehow cant be deleted.
here's my code



the problem here must be with the command
"if sprite exist(3)=1
delete sprite 3
endif"
pls help!

THE AOOS
Sync
22
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hungary
Posted: 4th Jul 2004 06:51
Here is your debugged code:



And here's an another solution. Easier to switch between two animations.



386SX, 2MB EDO RAM, 512kB VESA video card, 40MB HDD, 5,25 FDD
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 4th Jul 2004 07:59
hmm....

I'm trying to even figure out why you're deleting the sprites between the two animations. All you really need to do is just change the images used for the sprite, not delete and create a new one. Remember, sprites are "free" images, you just tell them to change what they look like when you use the sprite command.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2025-05-15 09:25:03
Your offset time is: 2025-05-15 09:25:03