• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Why does it not work?

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
I have a set of triggers, I'm wondering why it wont work.
What does not work?

There is no Golem spawning for active players.

It's these triggers.
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set PlayerPoint[(Integer A)] = ((Player((Integer A))) start location)
      • For each (Integer A) from 1 to 15, do (Actions)
        • Loop - Actions
          • Set SpawnItem[(Integer A)] = Red Crystal
      • For each (Integer A) from 16 to 25, do (Actions)
        • Loop - Actions
          • Set SpawnItem[(Integer A)] = Blue Crystal
      • For each (Integer A) from 26 to 30, do (Actions)
        • Loop - Actions
          • Set SpawnItem[(Integer A)] = Green Crystal
      • For each (Integer A) from 31 to 35, do (Actions)
        • Loop - Actions
          • Set SpawnItem[(Integer A)] = Black Crystal
  • Start The Game
    • Events
      • Player - Player 1 (Red) types a chat message containing START as An exact match
    • Conditions
    • Actions
      • Trigger - Run Multiboard <gen> (ignoring conditions)
      • Trigger - Turn off (This trigger)
  • Multiboard
    • Events
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Game Points
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Set the display style for Multiboard item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for Multiboard item in column 1, row 0 to 8.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 2, row 0 to 4.00% of the total screen width
      • Multiboard - Set the text for Multiboard item in column 1, row 1 to (PlayerColor[10] + Players: )
      • Multiboard - Set the text for Multiboard item in column 2, row 1 to (PlayerColor[10] + Points: )
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set PlayersActive = (PlayersActive + 1)
              • Multiboard - Set the text for Multiboard item in column 1, row ((Integer A) + 2) to (PlayerColor[(Integer A)] + (Name of (Player((Integer A)))))
              • Multiboard - Set the text for Multiboard item in column 2, row ((Integer A) + 2) to (String(PlayerPoints[(Integer A)]))
              • Unit - Create 1 Crystal Golem for (Player((Integer A))) at PlayerSpawn[(Integer A)] facing 0.00 degrees
              • Camera - Lock camera target for (Player((Integer A))) to (Last created unit), offset by (0.00, 0.00) using Default rotation
              • Set CrystalGolem[(Integer A)] = (Last created unit)
              • Set PlayersAlive = (PlayersAlive + 1)
            • Else - Actions
              • Multiboard - Set the text for Multiboard item in column 1, row ((Integer A) + 2) to (PlayerColor[9] + N/A)
      • Multiboard - Show Multiboard
So why wont it spawn a Golem? I'm not seeing something I should.
EDIT: Yes, the trigger runs as the multiboard is created.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
  • For each (Integer A) from 1 to 8, do (Actions)
    • Loop - Actions
      • Set //|PlayerPoint|\\[(Integer A)] = ((Player((Integer A))) start location)
Maybe becase you haven't used ''PlayerPoint'' variable for spawning. You used ''PlayerSpawn''.


  • Unit - Create 1 Crystal Golem for (Player((Integer A))) at //|PlayerSpawn|\\[(Integer A)] facing 0.00 degrees
Variable ''PlayerSpawn'' is not declared.
 
Status
Not open for further replies.
Top