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 Professional Discussion / Problem with playing sprite.. might be my mistake..

Author
Message
Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 20th May 2005 22:58
hey all..
im trying to play sprite using this code:



this is the code of load 20 images (from 1000 to 1020)

now when u using "play sprite" command, it says that the image not exist..
but it it exist! this how i checked it:
for a = 0 to 20
if image exist(a+1000)=1 then text 0,0+(a*15),"Image: "+str$(a)
next a

here is the image animation if u guys need..
http://62.0.80.240:81/anim.zip

so whats the problem? does someone can load and play it?

By the time you finish reading this, you realize you have wasted 5sec. of your life!
click here to return your 5sec.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th May 2005 23:41
Sorry to say you have got the wrong end of the stick with how animated sprites work. All animation frames should be in ONE image that you load with CREATE ANIMATED SPRITE command. 'Frames' are not individual files!

So you need to create a sprite 'sheet' with all your images in, load it in using CREATE ANIMATED SPRITE command. This is also where you specify number fo sprites across and down in your image.

Then use PLAY SPRITE. Frames would be from 1 to 20


Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 20th May 2005 23:44 Edited at: 20th May 2005 23:45
u are wrong.. i know that i can play it without using one image file..
i remember long time ago i have maked a game like this.. but i dont c any errors in that code (i maked it just like i have maked the old mine).

it just dont wont to work!

By the time you finish reading this, you realize you have wasted 5sec. of your life!
click here to return your 5sec.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 21st May 2005 00:17
Only way to do it keeping images seperate is to control which image is assigned to the sprite manually:



PS. I've been here for nearly 3 years and it's not me who is wrong.


Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 21st May 2005 00:23
heehee..spooky is never wrong

"We make the worst games in the universe."

Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st May 2005 00:24
ahh you know what, download my old game, and check how the files are stored.. and then u will c that i have used play sprite command..

http://i.domaindlx.com/gogetax/littledude.ace

just see how the files are stored in it, and i havent used "wait" command..

By the time you finish reading this, you realize you have wasted 5sec. of your life!
click here to return your 5sec.
Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st May 2005 00:25
Quote: "heehee..spooky is never wrong"

there is always first time

By the time you finish reading this, you realize you have wasted 5sec. of your life!
click here to return your 5sec.

Login to post a reply

Server time is: 2025-06-07 09:45:33
Your offset time is: 2025-06-07 09:45:33