HarryJames
2011-03-17 20:15:38
Hey :)
Is it possible to make my own data type?
Instead of having lots of messy arrays, I'd like to create an object/data type for a Dungeoneering bot. It will contain each rooms data, such as doors, locked doors, spawn point, cleared, etc etc.
(A class would do, if Simba supports classes).
Then say we have three rooms as objects/data types (whatever), searching through them for something for example, what room is the spawn. (I could have a seperate variable for that (in global vars), but it's just an example.)
Is it possible to make my own data type?
Instead of having lots of messy arrays, I'd like to create an object/data type for a Dungeoneering bot. It will contain each rooms data, such as doors, locked doors, spawn point, cleared, etc etc.
(A class would do, if Simba supports classes).
NewDataType Room
{
id: integer;
doors: integer;
doorLocations: TPointArray;
isSpawn: boolean;
}Then say we have three rooms as objects/data types (whatever), searching through them for something for example, what room is the spawn. (I could have a seperate variable for that (in global vars), but it's just an example.)