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

Spell doesn't work...

Status
Not open for further replies.
Level 4
Joined
Jun 7, 2008
Messages
37
  • Support Alone
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Support Strike
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Set Support_Alone[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set Support_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • Set Support_Point[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target[(Player number of (Owner of (Triggering unit)))])
      • Special Effect - Create a special effect at Support_Point[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target[(Player number of (Owner of (Triggering unit)))], dealing 120.00 damage of attack type Spells and damage type Normal
      • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to SupportGroup[(Player number of (Owner of (Triggering unit)))]
          • Set Support_Target2[(Player number of (Owner of (Triggering unit)))] = (Random unit from SupportGroup[(Player number of (Owner of (Triggering unit)))])
          • Set Support_Point2[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target2[(Player number of (Owner of (Triggering unit)))])
          • Special Effect - Create a special effect at Support_Point2[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target2[(Player number of (Owner of (Triggering unit)))], dealing 110.00 damage of attack type Spells and damage type Normal
          • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to SupportGroup2[(Player number of (Owner of (Triggering unit)))]
              • Set Support_Target3[(Player number of (Owner of (Triggering unit)))] = (Random unit from SupportGroup2[(Player number of (Owner of (Triggering unit)))])
              • Set Support_Point3[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target3[(Player number of (Owner of (Triggering unit)))])
              • Special Effect - Create a special effect at Support_Point3[(Player number of (Owner of (Triggering unit)))] using Doodads\Cinematic\Lightningbolt\Lightningbolt
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the foot of Support_Target3[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target3[(Player number of (Owner of (Triggering unit)))], dealing 100.00 damage of attack type Spells and damage type Normal
              • Custom script: call RemoveLocation (udg_Support_Point[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
              • Custom script: call RemoveLocation (udg_Support_Point2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
              • Custom script: call RemoveLocation (udg_Support_Point3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
It's a chain spell that SHOULD work, but doesn't. Why?

EDIT: Forgot to add this:
  • Support
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Player 1 (Red) slot status) Equal to (==) Is playing
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Morphling (Magic)) and do (Actions)
        • Loop - Actions
          • Set Magic[(Player number of Player 1 (Red))] = (Picked unit)
          • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to (==) Is playing) and (((Matching player) is an ally of Player 1 (Red)) Equal to (==) True))) and do (Actions)
            • Loop - Actions
              • Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Unit Group - Add (Picked unit) to SupportAlly[(Player number of Player 1 (Red))])
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (SupportAlly[(Player number of Player 1 (Red))] is empty) Equal to (==) True
              • Then - Actions
                • Unit - Add Support Strike to Magic[(Player number of Player 1 (Red))]
                • Unit - Remove Support Strike 2 from Magic[(Player number of Player 1 (Red))]
                • Unit - Remove Support Strike 3 from Magic[(Player number of Player 1 (Red))]
                • Unit - Remove Support Strike 4 from Magic[(Player number of Player 1 (Red))]
              • Else - Actions
                • Unit Group - Pick every unit in SupportAlly[(Player number of Player 1 (Red))] and do (Actions)
                  • Loop - Actions
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Picked unit)) Equal to (==) Morphling
                    • Then - Actions
                      • Unit - Add Support Strike 2 to Magic[(Player number of Player 1 (Red))]
                      • Unit - Remove Support Strike from Magic[(Player number of Player 1 (Red))]
                      • Unit - Remove Support Strike 3 from Magic[(Player number of Player 1 (Red))]
                      • Unit - Remove Support Strike 4 from Magic[(Player number of Player 1 (Red))]
                    • Else - Actions
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Picked unit)) Equal to (==) Morphling (Magic)
                        • Then - Actions
                          • Unit - Add Support Strike 3 to Magic[(Player number of Player 1 (Red))]
                          • Unit - Remove Support Strike 2 from Magic[(Player number of Player 1 (Red))]
                          • Unit - Remove Support Strike from Magic[(Player number of Player 1 (Red))]
                          • Unit - Remove Support Strike 4 from Magic[(Player number of Player 1 (Red))]
                        • Else - Actions
                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of (Picked unit)) Equal to (==) Morphling (Sword)
                            • Then - Actions
                              • Unit - Add Support Strike 4 to Magic[(Player number of Player 1 (Red))]
                              • Unit - Remove Support Strike 2 from Magic[(Player number of Player 1 (Red))]
                              • Unit - Remove Support Strike 3 from Magic[(Player number of Player 1 (Red))]
                              • Unit - Remove Support Strike from Magic[(Player number of Player 1 (Red))]
                            • Else - Actions
The spell varies depending on the ally's units, so it COULD've believed that I had an ally with me....
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Try putting the second 'pick every unit in..'-loop outside the first one, as well as set the 'set bj_wantDestroyGroup = true' to the above line of your pick units in.. actions.
Also, remove the points via the customscript at the very end of the trigger (outside the loop as it COULD bug)
 
Level 4
Joined
Jun 7, 2008
Messages
37
Try putting the second 'pick every unit in..'-loop outside the first one, as well as set the 'set bj_wantDestroyGroup = true' to the above line of your pick units in.. actions.
Also, remove the points via the customscript at the very end of the trigger (outside the loop as it COULD bug)

This is what I did:
  • Support Alone
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Support Strike
    • Actions
      • Set count[(Player number of (Owner of (Triggering unit)))] = 0
      • Set Support_Alone[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set Support_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • Set Support_Point[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target[(Player number of (Owner of (Triggering unit)))])
      • Special Effect - Create a special effect at Support_Point[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target[(Player number of (Owner of (Triggering unit)))], dealing 120.00 damage of attack type Spells and damage type Normal
      • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to SupportGroup[(Player number of (Owner of (Triggering unit)))]
          • Set Support_Target2[(Player number of (Owner of (Triggering unit)))] = (Random unit from SupportGroup[(Player number of (Owner of (Triggering unit)))])
          • Set Support_Point2[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target2[(Player number of (Owner of (Triggering unit)))])
          • Special Effect - Create a special effect at Support_Point2[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target2[(Player number of (Owner of (Triggering unit)))], dealing 110.00 damage of attack type Spells and damage type Normal
          • Set count[(Player number of (Owner of (Triggering unit)))] = (count[(Player number of (Owner of (Triggering unit)))] + 1)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • count[(Player number of (Owner of (Triggering unit)))] Equal to (==) 1
              • Then - Actions
                • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
                  • Loop - Actions
                    • Unit Group - Add (Picked unit) to SupportGroup2[(Player number of (Owner of (Triggering unit)))]
                    • Set Support_Target3[(Player number of (Owner of (Triggering unit)))] = (Random unit from SupportGroup2[(Player number of (Owner of (Triggering unit)))])
                    • Set Support_Point3[(Player number of (Owner of (Triggering unit)))] = (Position of Support_Target3[(Player number of (Owner of (Triggering unit)))])
                    • Special Effect - Create a special effect at Support_Point3[(Player number of (Owner of (Triggering unit)))] using Doodads\Cinematic\Lightningbolt\Lightningbolt
                    • Special Effect - Destroy (Last created special effect)
                    • Special Effect - Create a special effect attached to the foot of Support_Target3[(Player number of (Owner of (Triggering unit)))] using Abilities\Weapons\Bolt\BoltImpact.mdl
                    • Special Effect - Destroy (Last created special effect)
                    • Unit - Cause Support_Alone[(Player number of (Owner of (Triggering unit)))] to damage Support_Target3[(Player number of (Owner of (Triggering unit)))], dealing 100.00 damage of attack type Spells and damage type Normal
                    • Set count[(Player number of (Owner of (Triggering unit)))] = 0
              • Else - Actions
                • Custom script: call RemoveLocation (udg_Support_Point[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
                • Custom script: call RemoveLocation (udg_Support_Point2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
                • Custom script: call RemoveLocation (udg_Support_Point3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: set bj_wantDestroyGroup = true
Does still not work though. However, I might've misunderstood your post ;)
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
  • ...
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 700.00 of Support_Point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of Support_Alone[(Player number of (Owner of (Triggering unit)))])) Equal to (==) True) and (((Matching unit) is a and do (Actions)
Anyways, does the special effect even appear or is any damage dealt?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Well, in fact, i'm just dumb..
  • Set count[(Player number of (Owner of (Triggering unit)))] = 0
means that
  • Conditions
    • count[(Player number of (Owner of (Triggering unit)))] Equal to (==) 1
will never happen.
Also, try changing the event to "starts the effect of an ability"
And third, put the
  • Custom script: call RemoveLocation(udg_Support_Point[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
  • Custom script: call RemoveLocation(udg_Support_Point2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
  • Custom script: call RemoveLocation(udg_Support_Point3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
at the very end of your trigger + remove the spaces ;)
Last, you can use (Triggering Unit) instead of the Support_Alone[(Player number of (Owner of (Triggering unit)))] as it's saved local and so can't be overwritten, etc..
 
Status
Not open for further replies.
Top