integer messed up ?

Zorobay

Member
Reaction score
1
Okay so I have another problem.

I have made a kind of TD and the difficult level determines how many creeps that will spawn. So i have made integers for the number of units that will spa. The integer's value changes whether you choose very easy, easy and so forth. Now my problem is that these integers don't seem to work at all because it allways spawn the wrong number of units and always the same number?? Take a look at the scripts:

This one turns on the Very Easy Script!
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Clicked dialog button) Equal to buttonVERYEASY_2Plrs
    • Then - Actions
      • Trigger - Turn on Very Easy <gen>
      • Trigger - Turn off Easy <gen>
      • Trigger - Turn off Normal <gen>
      • Trigger - Turn off Hard <gen>
    • Else - Actions


This is the Very Easy Sript, it is initially ON

Trigger:
  • Very Easy
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set integerSpawnedUnitsBOSS = (Random integer number between 0 and 1)
      • Set integerSpawnedUnitsMore = (Random integer number between 1 and 2)
      • Set integerSpawnedUnitsLess = 5


This is the script that should spawn the creeps!
Trigger:
  • Wave 1
    • Events
      • Time - timerWAVE expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy timerwindowWave
      • -------- Units Spawn --------
      • Unit - Create integerSpawnedUnitsLess Tauren for Player 12 (Brown) at (Center of Creep Spawn 3 <gen>) facing Default building facing degrees
      • Unit - Create integerSpawnedUnitsMore Troll Spearman for Player 12 (Brown) at (Center of Creep Spawn 1 <gen>) facing Default building facing degrees
      • Unit - Create integerSpawnedUnitsMore Troll Spearman for Player 12 (Brown) at (Center of Creep Spawn 2 <gen>) facing Default building facing degrees
      • Unit - Create integerSpawnedUnitsMore Troll Spearman for Player 12 (Brown) at (Center of Creep Spawn 3 <gen>) facing Default building facing degrees
      • -------- Next wave --------
      • Trigger - Turn on Wave 2 <gen>



What's wrong!?! And YES i have double checked that the Variables are integers!
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Double check your Wave 1 trigger.
1) You spawn 5 Tauren
2) You spawn between 1-2
3) You spawn between 1-2
4) You spawn between 1-2
Is that how it should be? or not.
 

Zorobay

Member
Reaction score
1
first the one that now is five were like 1-0 but it allways spawned 2. Now i tested it by making it five and it still spawnes 2! Others are correct.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Oh i think i know why. Open the map by making a new game in single player. NOT THROUGH THE EDITOR!! It will make random numbers then.
 

Zorobay

Member
Reaction score
1
um why doesn't the integers work in "test mode" ? That is just, useless? But okay thanks i'll test that!
 

canons200

New Member
Reaction score
50
because the default setting, "use fixed random seed" is tick(under file, preference), it effect only editor single player, it has no problem in multiplayer mode. Don't worry, how you can just untick it.
 
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