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 display sprites in a nested for loop.

Author
Message
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 1st Aug 2010 02:21 Edited at: 1st Aug 2010 02:28
Hello. As the title suggests I'm having problems displaying sprites in a nested for loop. It's basically a bit of code designed to arrange 24 sprites on an 8x3 grid, however I'm having a problem with showing animated sprites, here's the bit that's not working:


(I hope that makes sense, my coding isn't particularly brilliant)

It does that on every loop at the moment (going to change it to only do that when required after I get it working). It will load the first monster file fine, but after that it doesn't show any more, I don't get any error messages and the fail file isn't made so the monster file must exist. any suggestions as to why or any possible solutions??

(p.s. here's the layout for the monster file in case you don't get why I'm skipping the first string)


edit: FIXED. I was telling it to go to the wrong location, my bad.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2010 02:35
Complete simple working code (i.e. not necessarily the whole project) plus media would be helpful so we can see for ourselves.

What screen resolution are you using and what values of X and Y do you get in the following line?



[using syntax sprite id, X, Y, im]

I wonder whether the sprites are positioned off-screen.
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 1st Aug 2010 02:44
I fixed it, I didn't tell it to go back to the monster file directory before trying to load another one. I've fixed it now, thanks for the comment though =)
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2010 03:13
Ah, I didn't spot that. Glad you found the problem though.

Login to post a reply

Server time is: 2026-07-25 08:36:40
Your offset time is: 2026-07-25 08:36:40