I am making a simple strategy game of sorts, but I'm a little confused. I've gone the OOP path, and I have a type called TMiner, and a type called TBase, whose objects are stored in the list EntityList. When a TMiner is created I want that units x and y (fields of TMiner) coords to start at the TBase x and y (fields of TBase) coords. Trouble is, there is more than one base and I am not sure how to do in code: A miner has been created at base x therefor its position is the same as base x.
I need to do something like this: x=EntityList(12).x (12 being the position in the list that base might be.)
It's kind of hard to explain.
I need to do something like this: x=EntityList(12).x (12 being the position in the list that base might be.)
It's kind of hard to explain.