GetRandomInt problem?

Gamat

New Member
Reaction score
1
I don't know what happens but GetRandomInt always give me the same numbers: for ex:

JASS:
function Trig_s_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
    call DisplayTimedTextToForce( bj_FORCE_PLAYER[0], 30, I2S(GetRandomInt(1, 10)) )
endfunction

//===========================================================================
function InitTrig_s takes nothing returns nothing
    set gg_trg_s = CreateTrigger(  )
    call TriggerAddAction( gg_trg_s, function Trig_s_Actions )
endfunction


Displays:

7
6
1
9
3
10

It's me or it is a bug with 1.24 or this is how it works?
 

Azlier

Old World Ghost
Reaction score
461
File > Preferences > Test Map

Uncheck "Use fixed random seed" or whatever it is.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Open the window tab, I think, and uncheck Fixed Random Seed. It's either there, or in the settings.

Edit: Darn you Aziler.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top