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 / Creating standard objects, that act the same

Author
Message
DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 7th Jan 2004 20:48
Opps forgot i wnated to ask another question. IM curious about the best way to make a standard object type. What i mean by this is how to get multiple copies of the same thing.

Examples: Units in a strategy game, bullets in anything, opponents(AI) in a fps.

Currently i just use for-next commands. so what i do for a bullet is:
(b=the bullet)
for b= 20 to 100
move object b,1
next b
is this the only weay to do it? . Right now it seems abit incoveinint if i wanted to use this system for my oppents.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 8th Jan 2004 00:33
a type with an array or a typed array is the best way in DBP so far to manage multiples of the same thing
diablo fan
20
Years of Service
User Offline
Joined: 7th Jan 2004
Location: michigan usa
Posted: 8th Jan 2004 03:21
what does that mean "type" of array or "typed"? do you mean a style of array?

me
diablo fan
20
Years of Service
User Offline
Joined: 7th Jan 2004
Location: michigan usa
Posted: 8th Jan 2004 03:43
sorry nevermind i found my answer
Yep, in DBP there is a form of a database called TYPES, they can be used like this...

Type CharacterStats
Name as STRING
Class as STRING
Health as INTEGER
Strength as INTEGER
EndType

Dim MainCharStats(1) AS CharacterStats
MainCharStats(1).Name = "Cloud"
MainCharStats(1).Class = "Fighter"
MainCharStats(1).Health = 200
MainCharStats(1).Strength = 5

me
DBasic Khan
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: Alpha Quadrent, Sector 1,1 SOL SYS
Posted: 8th Jan 2004 20:52
ok this is help full, but im not sure how to apply this to use. im realy noobish so i need allitle more explaining

Login to post a reply

Server time is: 2024-09-21 15:43:06
Your offset time is: 2024-09-21 15:43:06