• 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.

[Trigger] trigger only works for player 1???

Status
Not open for further replies.
Level 3
Joined
Jun 23, 2007
Messages
32
I've looked at everything and I can't figure out why this trigger only works for Player 1.

  • enter observer
    • Events
      • Unit - A unit enters make observer <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Golem Part
    • Actions
      • Unit Group - Add (Triggering unit) to partsobserver[(Player number of (Owner of (Triggering unit)))]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in partsobserver[(Player number of (Owner of (Triggering unit)))]) Equal to 2
        • Then - Actions
          • Unit Group - Pick every unit in partsobserver[(Player number of (Owner of (Triggering unit)))] and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Set point = (Center of specialunitspawnregion[(Player number of (Owner of (Triggering unit)))])
          • Unit - Create 1 Observer for (Owner of (Triggering unit)) at point facing (Random angle) degrees
          • Cinematic - Ping minimap for playergroup at point for 1.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100.00%)
          • Custom script: call RemoveLocation(udg_point)
          • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to playergroup for 10.00 seconds the text: (playername[(Player number of (Owner of (Triggering unit)))] + |cffffcc00summons an |r|c003366ffObserver.|r)
        • Else - Actions
It's designed to:

When 2 'Golem Parts' enter 'make observer', adds the unit to 'partsobserver[(player number)]

then checks if the group has 2 units, if it does, it does those other actions.

but in game, it only works when player 1's golem parts move into the area.

when other players try, nothing happens. why???
 
Level 3
Joined
Jun 23, 2007
Messages
32
i figured it out..

i had to set the size of the arrays appropriately to how many players there are.

i thought you didn't have to do that since i have other similar triggers in my map that work without me doing this. oh well..

edit: unit group arrays need size to be specified.
 
Status
Not open for further replies.
Top