GUI to JASS

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
[ljass]call SetPlayerTechMaxAllowed(Player(0),udg_AllUnits[bj_forLoopAIndex-1],0)[/ljass]

If you wan't it to be available, set 0 to -1.

EDIT: Use custom script function on GUI.
 

danpe

New Member
Reaction score
5
Trigger:
  • Map inizilazation
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Cinematic - Turn cinematic mode On for (All players) over 5.00 seconds
      • Cinematic - Fade out and back in over 5.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Cinematic - Disable user control for (All players)
      • Game - Display to (All players) for 3.00 seconds the text: Initializing game.....
      • Set TEMP_PreloadSpawnPoint = (Center of NO BUILD 1 <gen>)
      • Set AllUnits[0] = Murloc
      • Set AllUnits[1] = Troll
      • Set AllUnits[2] = Footman
      • Set AllUnits[3] = Grunt
      • Set AllUnits[4] = Coualt
      • Set AllUnits[5] = Small golem
      • Set AllUnits[6] = Kodo beast
      • Set AllUnits[7] = Small tornado
      • Set AllUnits[8] = Elvish runner
      • Set AllUnits[9] = Ogre
      • Set AllUnits[10] = Gargoyle
      • Set AllUnits[11] = Siege vehicle
      • Set AllUnits[12] = Naga mermaid
      • Set AllUnits[13] = Ancient hydra
      • Set AllUnits[14] = Tauren
      • Set AllUnits[15] = Priest
      • For each (Integer A) from 0 to 15, do (Actions)
        • Loop - Actions
          • Custom script: call SetPlayerTechMaxAllowed(Player(0),udg_AllUnits[bj_forLoopAIndex-1],0)
          • Player - Make AllUnits[(Integer A)] Unavailable for training/construction by Player 1 (Red)
      • Wait 3.00 seconds
      • Cinematic - Turn cinematic mode Off for (All players)
      • Cinematic - Enable user control for (All players)
      • Trigger - Run Timer <gen> (ignoring conditions)


I used this and still all units available for training..
 

tooltiperror

Super Moderator
Reaction score
231
Are you player red? Because it only makes them unavailable for player Red.
 

PrisonLove

Hard Realist
Reaction score
78
You don't need the piece of custom code in your loop, the GUI code does the exact same thing. Actually the JASS code should cause an issue, because when you use [ljass]bj_forLoopAIndex-1[/ljass] on the first iteration you're trying to get a unit at array location -1, which doesn't exist.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top