Same Randoms Each Time

Denegoth

New Member
Reaction score
18
Trigger:
  • Set TempAlchChance[4] = (Random integer number between 1 and 100)


For some reason, every time I load up the map and use the ability, it returns the exact same numbers in a certain order each time. The only 3 numbers I remember are 73, 75 and 97, in that order. I'm not sure if this is a single player only thing or not, but it's a major problem at the moment since the first 20 numbers are all over 50. I will post the whole code so you can see:

Trigger:
  • Minor Health Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Create Potion
      • ((Triggering unit) has an item of type Mortar and Pestle) Equal to True
      • ((Triggering unit) has an item of type Bluebloom Petal) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) Greater than or equal to 5
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal) to ((Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) - 5)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by (Triggering unit) of type Bluebloom Petal)) Equal to 0
            • Then - Actions
              • Item - Remove (Item carried by (Triggering unit) of type Bluebloom Petal)
            • Else - Actions
          • Set TempAlchChance[1] = 50
          • Set TempAlchChance[2] = (Alchemy_Level[(Player number of (Triggering player))] / 2)
          • Set TempAlchChance[3] = (TempAlchChance[1] + TempAlchChance[2])
          • Set TempAlchChance[4] = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempAlchChance[3] Greater than or equal to TempAlchChance[4]
            • Then - Actions
              • Hero - Create Minor Health Potion and give it to (Triggering unit)
              • Set TempAlchEXP = 5
              • Set TempPlayerLevelUp = (Owner of (Triggering unit))
              • Trigger - Run AlchemyLevelUp <gen> (ignoring conditions)
            • Else - Actions
              • Set TempAlchEXP = 1
              • Set TempPlayerLevelUp = (Owner of (Triggering unit))
              • Trigger - Run AlchemyLevelUp <gen> (ignoring conditions)
        • Else - Actions
 

Pyropenguins

New Member
Reaction score
4
This is the same for my map only when ever i hit test map while im in the WE. Is that what u r doin? if so see if actually opening the WC3 an test ur map from in there an see if its the same 3 numbers.
 

Denegoth

New Member
Reaction score
18
This is the same for my map only when ever i hit test map while im in the WE. Is that what u r doin? if so see if actually opening the WC3 an test ur map from in there an see if its the same 3 numbers.

I thought it would be something like that. Thanks my man, +rep.
 
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