Quote Originally Posted by Gadget
If I use PCreature it means I don't have to type cast it. I don't know if that's the best way of doing it or not?

Alternatively I could type cast it when I need to use it:-

eg.

TCreature(Player).DoAction;

as opposed to

Player.DoAction;

I really need to get to grips completely with pointers and pointers to types

I have used pointers throughout the game so far with no problems, it's just this that's bugging me (litteraly)
I see your point, is there a particular reason why you use TObjectList, you could always use TList which instead of resulting with TObject TList results the pointer and you can base your own class on this.. e.g.

[pascal]
type
TCreature = Class
// TCreature code
public
Name: String;
procedure DoAction;
end;

TCreatures = Class(TList)
private
function GetCreature(Index: Integer): TCreature;
public
function Add(Name: String): Integer;
property Items[Index: Integer]: TCreature read GetCreature; default;
end;

implementation

//----< TCreature >----//
procedure TCreature.DoAction;
begin
// Action
end;

//----< TCreatures >----//

function TCreatures.GetCreature(Index: Integer): TCreature;
begin
Result := Nil;
If (Index < 0) Or (Index > Count-1) Then Exit;
Result := TCreature(inherited Items[Index]);
end;

function TCreatures.Add(Name: String): Integer;
var
nCreature: TCreature;
begin
nCreature := TCreature.Create;
nCreature.Name := Name;
Result := inherited Add(nCreature);
end;
[/pascal]

and with this you can do what you want: Players[i].DoAction;

I find using this is a lot easier to deal with

hope it helps..