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! / Help with a Sprite loop

Author
Message
Jadelion
22
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 17th Mar 2004 10:59
Ok, I've got a small problem and I can't seem to think of the answer. I'm drawing a bunch of sprites to the screen (25 right now but probably more if I can fix this problem) and each of the sprites recieves it's image number from an array, but apparently I have to feed the array value into a variable to get it to work. So right now my code looks like this.

So this is rather tedious as there are 50 lines of it, I know the answer is probably a big FOR NEXT loop, but I can't seem to get everything in the right order. I've got to increase the SPRITE NUMBER, adjust X and Y, and change the image number.

...that move was indeed...Bold.
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Mar 2004 11:41
This should be close to working, but I don't know how many pixels wide your images are, and a few other things. You can probably work it out yourself.



Jadelion
22
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 17th Mar 2004 21:18
Thanks, that was just about right for what I needed. I had to adjust it a little but it worked out well. this is the final loop


...that move was indeed...Bold.

Login to post a reply

Server time is: 2025-08-09 02:12:01
Your offset time is: 2025-08-09 02:12:01