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 / Keeping track of points

Author
Message
Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 16th Dec 2009 03:27
How would you keep track of certain objects, say points?

Like their x positions, y positions, and other information?

As if I were making a falling sand game.

DBPro!
Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 16th Dec 2009 04:30
Use a variable to store a specific piece of information, so for an object position:

objxpos = OBJECT POSITION X(objnum)

So the x position of objnum is stored in objxpos.

Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 17th Dec 2009 04:06
What if these points were being created and deleted?

DBPro!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Dec 2009 14:25
What you are talking about is 'arrays'.

See tutorial number 1 here...

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

TDK

Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 17th Dec 2009 14:28
...
Ah yes, arrays.
How did I not think of that?


(When I post here, do I seem like a newcomer to programming?)

DBPro!
Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 17th Dec 2009 14:48 Edited at: 17th Dec 2009 14:49
To be honest, yes - I really didn't know what you were on about.

Nothing wrong with that though, everyone has to start somewhere!

Login to post a reply

Server time is: 2024-11-24 23:47:21
Your offset time is: 2024-11-24 23:47:21