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 problem

Author
Message
Harris
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location:
Posted: 20th Jul 2004 19:55 Edited at: 20th Jul 2004 20:10
Hi I've tried to post this msg before but with no luck could anybody advise me about my sprites? the animation of my first sprite ha a small problem it disappears when the leftkey has been stroke three times. If I exclude the second sprite then it works properly I a bit new here could you please help me out???
Thanx I am starting to freak out here



X CORE T
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 21st Jul 2004 05:07 Edited at: 21st Jul 2004 05:09
Quote: "
LOAD BITMAP "maplevel2.bmp",1

for x=0 to 3
GET IMAGE 1+x,(x*260),0,(x*260)+260,780
next x
sprite 1,Txpos,Typos,Timage
"


Here you load a bitmap and "grab" images 1,2,3,4. presumedly for level images

Quote: "
LOAD BITMAP "player.bmp",2
GET IMAGE 2,2,0,45,42
"


Here you are essentially wiping out your previouse reference to image 2 replacing it with a single player image.

So I am not exactly sure what you are trying to do with sprite 1. Sprite 1 is a single sprite that contains 4 images of animation. Not knowing what your bitmaps are actually of it looks like three of the frames of animation for the sprite is level images 4, 3 & 1; and only 1 frame of animation is a player image, image 2. Is this intentional?

I am thinking not because sprite 2 is using image 2 for the player. It seems to me you are overlapping and using image 2 for ttwo different purpoese. My suggestion is to first make the second get image command to image #5 like this:

LOAD BITMAP "player.bmp",2
GET IMAGE 5,2,0,45,4
delete bitmap 2

sprite 2,Nxpos,Nypos,5

~zen


Harris
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location:
Posted: 21st Jul 2004 18:06
Thank you dude your great
that was the problem I didn't think of it
my regards
Charris

X CORE T

Login to post a reply

Server time is: 2025-05-15 08:52:48
Your offset time is: 2025-05-15 08:52:48