• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Generating random numbers?

Status
Not open for further replies.
Level 2
Joined
Feb 6, 2005
Messages
17
Is it possible to create random number in WE sans JASS? I've looked but there seems to be no sign of it, coud've sworn it was there.
 
Level 2
Joined
Feb 6, 2005
Messages
17
Sorry I took so long, I was on vacation. Anyways what I mean I would like to know if there is some event that goes like this.

Event - Random number is generated from X to X

And a condition that goes like this.

Condition - If random number generated equal to number beetween X to X
 
Level 7
Joined
Feb 15, 2005
Messages
183
you are going to have to make the event be a periodic, and the condition be an integer comparison. so it woudl look something like this

Event - every 1 second
Condition -
AND - Integer X is less than Y
Integer X is more than Z
Action -
(what ever you want)


You are going to have to make Integer X a global variable and you can use other triggers and events to alter the value of the global.
 
Status
Not open for further replies.
Top