• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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