• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

does any one know the proper syntax for wc3 editor

Level 11
Joined
Mar 1, 2009
Messages
365
WC3 says undeclared identifier 'udg_slot_taken' i am unsure of what that means



  • Custom script: exitwhen udg_Slot_Taken[udg_StartRandom_Index] == false
i am try to create a trigger to place players at random start points since wc3 original trigger stopped working in my online game

  • dialog choose race Copy
    • Events
      • Time - Elapsed game time is 3.00 seconds
    • Conditions
    • Actions
      • Set VariableSet PlayerStart_Points[1] = (Player 1 (Red) start location)
      • Set VariableSet PlayerStart_Points[2] = (Player 2 (Blue) start location)
      • Set VariableSet PlayerStart_Points[3] = (Player 3 (Teal) start location)
      • Set VariableSet PlayerStart_Points[4] = (Player 4 (Purple) start location)
      • Set VariableSet PlayerStart_Points[5] = (Player 5 (Yellow) start location)
      • Set VariableSet PlayerStart_Points[6] = (Player 6 (Orange) start location)
      • Set VariableSet PlayerStart_Points[7] = (Player 7 (Green) start location)
      • Set VariableSet PlayerStart_Points[8] = (Player 8 (Pink) start location)
      • Set VariableSet PlayerStart_Points[9] = (Player 9 (Gray) start location)
      • Set VariableSet PlayerStart_Points[10] = (Player 10 (Light Blue) start location)
      • Set VariableSet PlayerStart_Points[11] = (Player 11 (Dark Green) start location)
      • Set VariableSet PlayerStart_Points[12] = (Player 12 (Brown) start location)
      • Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing).) and do (Actions)
        • Loop - Actions
          • Set VariableSet StartRandom_Index = (Random integer number between 1 and 12)
          • Custom script: loop
          • Custom script: exitwhen udg_Slot_Taken[udg_StartRandom_Index] == false
          • Set VariableSet StartRandom_Index = (Random integer number between 1 and 12)
          • Custom script: endloop
      • Dialog - Clear mydialog
      • Dialog - Change the title of mydialog to Choose a Race
      • Dialog - Create a dialog button for mydialog labelled Legion
      • Set VariableSet button1legion = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Naga
      • Set VariableSet button2naga = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Night Elf
      • Set VariableSet button3NightElf = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Nerubian
      • Set VariableSet button4Nerubian = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Corrupted
      • Set VariableSet button5satyr = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Tribunal
      • Set VariableSet button6tribunal = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Horde
      • Set VariableSet button7orc = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Scourge
      • Set VariableSet button8scouge = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Kalindorn
      • Set VariableSet button19kalindorn = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Ice Born
      • Set VariableSet Button24Nor = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled more >>
      • Set VariableSet Button0SeconPage = (Last created dialog Button)
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show mydialog for (Picked player)
i have two other pages of dialog for picking a race and that all works I'm just trying to insert additional stuff to make it random spawn once again since the wc3 random placement trigger has seemed to stop working online.
 
thank you this is what gemini eventually came up with:
  • dialog choose race Copy
    • Events
      • Time - Elapsed game time is 3.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set VariableSet Random_Pool[(Integer A)] = (Integer A)
      • Set VariableSet Total_Pool_Size = 12
      • Set VariableSet PlayerStart_Points[1] = (Player 1 (Red) start location)
      • Set VariableSet PlayerStart_Points[2] = (Player 2 (Blue) start location)
      • Set VariableSet PlayerStart_Points[3] = (Player 3 (Teal) start location)
      • Set VariableSet PlayerStart_Points[4] = (Player 4 (Purple) start location)
      • Set VariableSet PlayerStart_Points[5] = (Player 5 (Yellow) start location)
      • Set VariableSet PlayerStart_Points[6] = (Player 6 (Orange) start location)
      • Set VariableSet PlayerStart_Points[7] = (Player 7 (Green) start location)
      • Set VariableSet PlayerStart_Points[8] = (Player 8 (Pink) start location)
      • Set VariableSet PlayerStart_Points[9] = (Player 9 (Gray) start location)
      • Set VariableSet PlayerStart_Points[10] = (Player 10 (Light Blue) start location)
      • Set VariableSet PlayerStart_Points[11] = (Player 11 (Dark Green) start location)
      • Set VariableSet PlayerStart_Points[12] = (Player 12 (Brown) start location)
      • Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing).) and do (Actions)
        • Loop - Actions
          • Set VariableSet Temp_Random = (Random integer number between 1 and Total_Pool_Size)
          • Set VariableSet Player_Assigned_Spot[(Player number of (Picked player))] = Random_Pool[Temp_Random]
          • Set VariableSet Random_Pool[Temp_Random] = Random_Pool[Total_Pool_Size]
          • Set VariableSet Total_Pool_Size = (Total_Pool_Size - 1)
      • Dialog - Clear mydialog
      • Dialog - Change the title of mydialog to Choose a Race
      • Dialog - Create a dialog button for mydialog labelled Legion
      • Set VariableSet button1legion = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Naga
      • Set VariableSet button2naga = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Night Elf
      • Set VariableSet button3NightElf = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Nerubian
      • Set VariableSet button4Nerubian = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Corrupted
      • Set VariableSet button5satyr = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Tribunal
      • Set VariableSet button6tribunal = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Horde
      • Set VariableSet button7orc = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Scourge
      • Set VariableSet button8scouge = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Kalindorn
      • Set VariableSet button19kalindorn = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled Ice Born
      • Set VariableSet Button24Nor = (Last created dialog Button)
      • Dialog - Create a dialog button for mydialog labelled more >>
      • Set VariableSet Button0SeconPage = (Last created dialog Button)
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show mydialog for (Picked player)
all working off line we will see on line
 
Back
Top