Jump to content


Photo

Could Someone Tell Me How To Get A Random #


  • Please log in to reply
6 replies to this topic

#1 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 01:49 PM

I see in the ActionScript readme there's $random$, but in the internal.xml I see just $rand$. What I want is to be able to get a random # from 0 to 50. No more, no less.

Incase you must know why, it's for my NewsChanger Script

Edited by flattspott, 09 February 2004 - 01:57 PM.


#2 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 02:04 PM

It's "$rand$"

Used with MOD of 51, it should give you a number from 0-51

#3 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 02:07 PM

Like this,

SET jump $rand$
MOD jump 51

Edited by flattspott, 09 February 2004 - 02:07 PM.


#4 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 02:23 PM

yes.

#5 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 02:28 PM

Thanks, that was what I wanted, now I just have to throw some ifs in there to keep it from going to a negative number and I'll be set.

#6 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 09 February 2004 - 08:19 PM

It shouldn't be giving you any negative numbers huh.gif

#7 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 09 February 2004 - 10:15 PM

Well after I finish up the basics of my newest script ConfigSwitch I post the section so someone can correct me. wink.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users