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 / List of all create sprites

Author
Message
Stefan p
15
Years of Service
User Offline
Joined: 2nd Nov 2008
Location: Online
Posted: 26th Sep 2009 03:13 Edited at: 26th Sep 2009 03:14
I was wondering if their was a command that tells you all the sprites that are being used and then puts them into an array. I was wondering this because I am making a top down game where objects appear on maps which are bigger then the screen and I wanted to add the difference between the cameras x postition to the worlds postition. If there is not I will make this a capability in one of my functions.

EDIT: If a mod could edit the title from saying create to created that would be apprecitated

Thanks, Stefan
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Sep 2009 07:13
you'd have to build that array yourself.


Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Sep 2009 07:32 Edited at: 26th Sep 2009 07:33
You can use the SPRITE EXIST() command to see if a particular sprite exists. If you want to check for all sprites you use a FOR/NEXT loop to run that command through all the sprites you may have in your program.



The above will work if you add to the array instead of writing to a file... but generally if you want a sprite number to be recorded in an array you do that right after the sprites creation. If you do that you don't have to later try to figure out which sprites exists with a FOR/NEXT loop.

Login to post a reply

Server time is: 2024-09-28 10:22:59
Your offset time is: 2024-09-28 10:22:59