|
-
January 9th, 2000, 03:24 PM
#1
Arrays in a class
Hi, I'm writing a program that parses a text-file. That text-file is actually a file that contains values for creating your own bot (computer-controlled player) in the game Quake 3 Arena. The text-file has a structure like this:
skill 1
{
name "blabla"
accuracy "12"
viewfactor "5"
...
}
skill 4
{
name "blabla"
accuracy "20"
viewfactor "6"
...
}
skill 5
{
name "blabla"
accuracy "30"
viewfactor "10"
...
}
I want to create a class (called bot) so that I can write code that sais
dim mybot as new bot
I want that the class has properties like
mybot.skill1.name = "hello"
mybot.skill1.accuracy = 15
mybot.skill1.accuracy = 20
mybot.skill5.accuracy = 30
is it possible to do something like this in VB, is it possible to declare these properties of the bots as arrays in the class file or must I use some other method?
I have never worked with class files before if anybody could help me out, I would appreciate it greatly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|