Arrays Inside Types
BlitzPlus Forums/BlitzPlus Programming/Arrays Inside Types| 
 | ||
| I'm working on a battle simulator for a game which my friends and I play.  I have most of the program down, but I have a minor problem.  I want to incorporate multiple "Teams" that will fight eachother, and I also want to be able to list out all of the NPC's/players that are on any team.  However, simply scanning through types to find which characters have the team set to the character\meta\team.team type field seems rather slow and kluge.  I know that in C/C++ I could create classes/stucts with arrays inside of them, but how do I do this with types in Blitz?  That way I could just make a list of pointers to the NPC's/players and store it into the array.  Any help would be greatly appreaciated. | 
| 
 | ||
| Hmm... I suppose I could just use a bank and create my own array from scratch, but arrays would still be easier.  So the question still stands, is there any way to use arrays inside of types? | 
| 
 | ||
| Type player Field stuff End Type Type Team Field p.player[20] End Type | 
| 
 | ||
| Hmm... I actually did wonder if that would do it, but I figured that there were so few similarities between blitz and C++ syntax that it wouldn't be worth trying.  Thanks for the quick hint, I'll put it to good use. |