I saw a function once that detected if all the players were not active, i forgot how to do it. (And I will not be accepting simple ways out of it) (eg just using howmanyplayers>= 8 then if players[8] blah blah...) can anyone show me how?
I saw a function once that detected if all the players were not active, i forgot how to do it. (And I will not be accepting simple ways out of it) (eg just using howmanyplayers>= 8 then if players[8] blah blah...) can anyone show me how?
why does it matter? the script stops if all the players are false ne way
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
Not if its looping, and at the end it will print a final progress report....
i did this just as a fail safe
SCAR Code:for i := 0 to howmanyplayers-1 do
if players[i].active=true then
activity:=activity+1;
until (activity=0);
not if you do a while loop then use brambles and make a var thats true if all are false thenSCAR Code:while flase= true do
everything else
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
Ill try it out, Thanks.
You can use a function I made if you don't want to use the other suggestions posted earlier.
SCAR Code:function AllPlayersAreFalse: Boolean;
var
i, FalseCount: Integer;
begin
for i := 0 to HowManyPlayers - 1 do
begin
if(Players[i].Active) then
begin
Result := False;
Break;
end else
FalseCount := FalseCount + 1;
end;
if(FalseCount = HowManyPlayers) then
Result := True;
end;
:-)
To late =P i just made one =P, ive finished the script now. ^^ althougth its not been tested
What the? Why are all your functions so long?
Here:
SCAR Code:function AllPlayersInactive : Boolean;
var
I : integer;
begin
for I := 0 to HowManyPlayers - 1 do
if Players[I].Active then
Exit;
Result := True;
end;
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
There are currently 1 users browsing this thread. (0 members and 1 guests)