Thread: command?
View Single Post
  #3  
Old 03-06-2003, 08:28 PM
ShadowDarkstar ShadowDarkstar is offline
Registered User
ShadowDarkstar's Avatar
Join Date: Feb 2003
Location: Montreal
Posts: 42
ShadowDarkstar is on a distinguished road
Quote:
Originally posted by Knuckles
Generate a random level? I'm not sure what your talking about; 'cause I never actually played 2k1. Just sat on it and talked and worked on Frolic. But, I'm pretty sure the map is like an array, like:

Level_Letter-#.graal

So make an array of letters, then tokenize it, and generate a random #, and letter.

NPC Code:

setstring this.letter = #t(int(rand(0,arraylen(lettersarray))));
this.randnum = int(rand(0,maxnum)))



Then use those in the setlevel part.
not 2k1(GMB), 2k2(GK) =/
dunno
maybe they have a ton of levels already uploaded and its a random level number
im sure they would have to add the number to a certain string to make sure it doesnt generate the same number twice
Reply With Quote