OK, so i decided to go back to basics and try and make something that would do something visual, so that i know that it is doing something. So i changes ReduceLife() to also move the TDart up by 10. also, everytime that i press TButton1, it creates a new TDart, adds it to an array, and then calls, Reduce life for each item in the array.
It works to some extent, when i press the button, it generates a Tshape, and moves it up by 10. but for every subsequent button press, it moves the fist object up by 10, but none of the others created by the same button that worked for the first one!
{Nothing has changes elsewhere}
procedure TDart.ReduceLife();
begin
if FLife > 0 then
Dec(FLife); //decreases FLife
Self.Top:= Self.Top-10;
end;
procedure TForm1.Button1Click(Sender: TObject); //Lets Me Create LOTS Of Shapes on the click of a button
var
s1: TDart;
j:integer;
begin
s1:= TDart.Create(Self); //Self Refers to TForm1 (Creates the Shape)
s1.FSetGradient((Player.Top-s1.FY1)/(Player.Left-s1.FX1)); //Runs the Procedure Gradient Target Objects Coordinates
TDartList[i] := s1;
for j := 0 to High(TDartList) do
begin
TDartList[j].ReduceLife;
end;
i:=i+1;
SetLength(TDartList, (High(TDartList)+1))
end;
begin
i := 0;
SetLength(TDartList, 1);
end.