3Garrett3
2010-06-13 13:59:51
Could someone make this function?
I know that there is a GetObjectAt function, to get an object's tile, but there is none for the NPC.
NPCs usually aren't static, but fishing spots are quite static, which is what I would like to use it for. And I have no idea how to turn
into an NPC function.
I know that there is a GetObjectAt function, to get an object's tile, but there is none for the NPC.
NPCs usually aren't static, but fishing spots are quite static, which is what I would like to use it for. And I have no idea how to turn
function GetObjectAt(T: TTile; objType: Integer): TRSObject;
var
objFuncts: array [0..3] of function(T: TTile):TRSObject;
begin
Result := NULL_RSOBJECT;
objFuncts[0] := @GetInteractableAt; objFuncts[1] := @GetWallObjectAt;
objFuncts[2] := @GetWallDecorAt; objFuncts[3] := @GetFloorDecorAt;
Result := objFuncts[objType](T);
end;
into an NPC function.