
Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
Re: Dynamic Script Usage
Kind of.I'm not good with using arrays. Are you saying that I need to specify the range of which the array contains? Something like var PlayerAmount array of [0,1,2,3,4,5]; or something...not even close to that? XD
Array of known length are declared like so: var ArrayName: array [0..8] of Integer;
Where array is set to have elements from 0 to 8. So you can safely access ArrayName[0], ArrayName[1] .. ArrayName[8].
In your case, of course, you set your maps player count minus one instead of 8.
So that 1st player uses element 0, second player uses element 1, etc.