• 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] Special Trigger

Status
Not open for further replies.
Level 4
Joined
Apr 22, 2020
Messages
53
SOLVED : I was desindexing wrong... Sorry for bothering...

Hi.

I have an issue with these triggers.

I'm trying to make a unit(Fury) who can attack only one unit. If she kills her target, she turns back into another unit (Basal Golem). If not, she just die.

There is also an ability to sacrifice your unit to get mana. So I had to set a trigger for this situation too.

There are 3 triggers :

  • Fury Attack
    • Events
      • Unit - A unit gets an order with an object as a target
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Different to Player 11 (Vert foncé)
          • (Owner of (Triggering unit)) Different to Player 12 (Marron)
          • (Unit-type of (Triggering unit)) Egal to Fury
          • Or - Any (Conditions) are true
            • Conditions
              • (Issued order) Egal to (Order(smart))
              • (Issued order) Egal to (Order(attack))
    • Actions
      • Set FuryAttack_Index = (FuryAttack_Index + 1)
      • Set FuryAttack_Target[FuryAttack_Index] = (Target unit of issued order)
      • Set FuryAttack_Owner[FuryAttack_Index] = (Owner of (Triggering unit))
      • Set FuryAttack_Unit[FuryAttack_Index] = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Different to Player 1 (Rouge)
          • (Owner of (Triggering unit)) Different to Player 2 (Bleu)
          • (Owner of (Triggering unit)) Different to Player 3 (Cyan)
        • Then - Actions
          • Unit - Change ownership of (Triggering unit) to Player 12 (Marron) and Keep color
          • Wait 0.10 seconds
          • Unit - Order FuryAttack_Unit[FuryAttack_Index] to Attack FuryAttack_Target[FuryAttack_Index]
        • Else - Actions
          • Unit - Change ownership of (Triggering unit) to Player 11 (Vert fonce) and Keep color
          • Wait 0.10 seconds
          • Unit - Order FuryAttack_Unit[FuryAttack_Index] to Attaquer FuryAttack_Target[FuryAttack_Index]
  • Fury Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer FuryAttack_LoopInteger) from 1 to FuryAttack_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Egal to FuryAttack_Target[FuryAttack_LoopInteger]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • if - Conditions
                  • (FuryAttack_Unit[FuryAttack_LoopInteger] is alive) Egal to TRUE
                • Then - Actions
                  • Effet special - Create a special effect at (Position of FuryAttack_Unit[FuryAttack_LoopInteger]) using Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
                  • Effet special - Destroy (Last created special effect)
                  • Unit - Remove FuryAttack_Unit[FuryAttack_LoopInteger] from the game
                  • Unit - Create 1 Obelisk for FuryAttack_Owner[FuryAttack_LoopInteger] at (Position of FuryAttack_Unit[FuryAttack_LoopInteger]) facing Orientation defaut degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • if - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Owner of (Last created unit)) Egal to Player 11 (Vert foncé)
                      • (Owner of (Last created unit)) Egal to Player 12 (Marron)
                • Then - Actions
                  • Unit - Remove (Last created unit) from the game
                • Else - Actions
            • Else - Actions
  • Fury Sacrifice
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Egal to Sacrifice
  • Actions
    • For each (Integer FuryAttack_LoopInteger) from 1 to FuryAttack_Index, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering unit) Egal to FuryAttack_Target[FuryAttack_LoopInteger]
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • if - Conditions
                • (FuryAttack_Unit[FuryAttack_LoopInteger] is alive) Egal to TRUE
              • Then - Actions
                • Effet special - Create a special effect at (Position of FuryAttack_Unit[FuryAttack_LoopInteger]) using Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
                • Effet special - Destroy (Last created special effect)
                • Unit - Remove FuryAttack_Unit[FuryAttack_LoopInteger] from the game
                • Unit - Create 1 Obelisk for FuryAttack_Owner[FuryAttack_LoopInteger] at (Position of FuryAttack_Unit[FuryAttack_LoopInteger]) facing Orientation defaut degrees
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • if - Conditions
                • Or - Any (Conditions) are true
                  • Conditions
                    • (Owner of (Last created unit)) Egal to Player 11 (Vert foncé)
                    • (Owner of (Last created unit)) Egal to Player 12 (Marron)
              • Then - Actions
                • Unit - Remove (Last created unit) from the game
              • Else - Actions
          • Else - Actions

I tried to desindex but it doesn't work anymore... Maybe I desindexed wrong...

I have some issues like several basal golems are created instead of 1...
 
Last edited:
Status
Not open for further replies.
Top