Dilplomacy

Blitz3D Forums/Blitz3D Beginners Area/Dilplomacy

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

well, theres alot of different ways to make invintories, some people prefer to use types in types, usually i prefer to do something like this. first a make type Item
Type Item
  field id
  field stats
  field misc
end type


and in the beginning of the code somewhere i make all the items i need. and assign them all a unique id. them i make type Inv

Type Inv
  field Id
  field stats
  field misc
end type


you can make type inv into an array thats the max amount of items that you can have. whenever you refer to an Inv slot all you need is its ID, then use a for..next loop to match it to the item of matching id, and tell get its stats, misc from the items stats,misc...

if your using a set amount of rescources typ thing then theres probly and easier way, this way it more openended.