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.

Newcomers DBPro Corner / grr too long

Author
Message
Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 28th Feb 2008 17:04
in this code i wrote:



in this part:



is there any easier more \"formulatic\" way of doing this? things driving me insane. its ugly to look at. is there anyway i could do this in one line without just , Putting it all on one line so to speak...

Your signature has been erased by a mod - please limit your signature to 600x120
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 28th Feb 2008 18:06
Maybe something like this:




Whatever...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Feb 2008 18:12 Edited at: 28th Feb 2008 18:14
Your routine was putting the same sprite (1) on the screen which didn't make sense. I've changed it to use image n (and indented your code). Just change it back to 1 if you need to.

Your create animated sprite command didn't give any clues as to the size of your sprite so I just assumed it was 10x10 pixels.



[Edit] Doh! As usual, someone beat me to it!...

TDK_Man

Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 28th Feb 2008 21:00
sprite (1)? no it used sprite n creates 100 sprites (first loop) then the second one loops again this time displauing the sprites. (yes they were 10x10)


TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Feb 2008 21:26 Edited at: 28th Feb 2008 21:30
Yes - I see now. As primarily a DBC user I wasn't at first familiar with what create animated sprite did.

Was what Dabbler or I suggested what you were looking for?

[Edit] I forgot to mention - don't forget to move the data statements to the end of the program as mentioned in one of your other threads.

TDK_Man

Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 29th Feb 2008 02:46
okay will do, thanks for reminding me.


Login to post a reply

Server time is: 2024-11-25 07:39:33
Your offset time is: 2024-11-25 07:39:33