Pakyakkistan
2014-03-11 17:08:14
I modified this function from the includes, and call for it in my hopping procedure. I feel like I can simplify this with 'for' loop? Array? Getting to be arrays and 'for' loops that I cannot seem to grasp yet…
If someone would be so kind as to help, or to explain to me how to go about it, I would much appreciate it.
If someone would be so kind as to help, or to explain to me how to go about it, I would much appreciate it.
//Uses const values to choose a world based on the current hop rotations
function RandomWorldSpEx(WorldChoice1, WorldChoice2, WorldChoice3, WorldChoice4 : Integer):Integer;
begin
If Hops = 0 then//This can be removed if Hops +1 is called before this function is called
begin
Result := WorldChoice4;
end else;
If Hops = 1 then
begin
Result := WorldChoice1;
end else;
If Hops = 2 then
begin
Result := WorldChoice2;
end else;
If Hops = 3 then
begin
Result := WorldChoice3;
end else
If Hops = 4 then
begin
Result := WorldChoice4;
Hops := 0;//After WorldChoice4, we then restart at WorldChoice1
//Hops integer needs to be added after this function is called so you don't Worldchoice4 x2
//Unless Hops = 0 if loop is removed and Hops +1 is called prior to this being called
end else;
end;