Selecting Random Array Element?

Discussion in 'Scar/Simba Help' started by Bbri06, Dec 6, 2008.

Selecting Random Array Element?
  1. Unread #1 - Dec 6, 2008 at 12:03 AM
  2. Bbri06
    Joined:
    May 21, 2006
    Posts:
    911
    Referrals:
    1
    Sythe Gold:
    0

    Bbri06 Apprentice

    Selecting Random Array Element?

    EDIT: Figured it out after posting this was very obvious, sorry. Please close.

    Ok, so I am trying to get a script to use a random element of an array in the WalkToTileEx function, any help?

    Code:
    Procedure Setup;
    begin
      SetArrayLength(FindCrab, 5);
      FindCrab[0] := IntToPoint(2694,3724);
      FindCrab[1] := IntToPoint(2701,3727);
      FindCrab[2] := IntToPoint(2704,3726);
      FindCrab[3] := IntToPoint(2701,3719);
      FindCrab[4] := IntToPoint(2702,3716);
    end;
    
    That is the array and I want use a random tile in there(0 - 4).
     
< Scar 3.15b | Need Help With Scar!!! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site