Item system hhmmm?

Blitz3D Forums/Blitz3D Beginners Area/Item system hhmmm?

Something like this maybe:

Type Player
     Field Name$
     Field Strength%
     Field Dexterity%
     Field Constitution%
     Field Wisdom%
     Field Intelligence%
     Field Charisma%
     Field MaxCarry#
     Field InventoryWeight#
End Type

Player1.player = new player

player1\Name = "Bob the Hunter" ;ensure the name is unique if you're doing multiplayer
player1\Strength = 14
player1\Dexterity = 13
player1\Constitution = 12
player1\Wisdom = 10
player1\Intelligence = 12
player1\Charisma = 14
player1\MaxCarry = player1\Strength * 5

Type Item
     Field Name$
     Field Weight#
     Field Owner$
End Type


Function AddItem(p_Item.Item)

  If Player1\InventoryWeight + p_Item\Weight <= Player1\MaxCarry then
    ;Not carrying too much, add the item
    p_Item\Owner = Player1\Name
    Player1\InventoryWeight = Player1\InventoryWeight + p_Item\Weight
  Else
    Print "You're carrying too much"
  EndIf
End Function