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

[Solved] Dummy spell issue

Status
Not open for further replies.
Level 9
Joined
Jun 1, 2008
Messages
180
So I've got the following trigger:

  • FC Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack
      • UnitType_Champion[(Player number of (Triggering player))] Equal to Fire Conjurer
    • Actions
      • Set Boolean_Attacking[(Player number of (Triggering player))] = True
      • Set Point_ChampionPosition[1] = (Position of Unit_Champion[1])
      • Set Point_ChampionPosition[2] = (Position of Unit_Champion[2])
      • Unit - Remove Unit_Champion[(Player number of (Triggering player))] from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Create 1 UnitType_Champion[(Player number of (Triggering player))] for (Triggering player) at Point_ChampionPosition[(Player number of (Triggering player))] facing (Position of Unit_Champion[2])
        • Else - Actions
          • Unit - Create 1 UnitType_Champion[(Player number of (Triggering player))] for (Triggering player) at Point_ChampionPosition[(Player number of (Triggering player))] facing (Position of Unit_Champion[1])
      • Set Unit_Champion[(Player number of (Triggering player))] = (Last created unit)
      • Animation - Play Unit_Champion[(Player number of (Triggering player))]'s attack animation
      • Animation - Queue Unit_Champion[(Player number of (Triggering player))]'s stand animation
      • -------- UNIQUE --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Create 1 Dummy for (Triggering player) at Point_ChampionPosition[(Player number of (Triggering player))] facing (Position of Unit_Champion[2])
          • Set Unit_Dummy[(Player number of (Triggering player))] = (Last created unit)
          • Animation - Change Unit_Dummy[(Player number of (Triggering player))]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
          • Unit - Add Dummy Spell - Fire Conjurer Attack to Unit_Dummy[(Player number of (Triggering player))]
          • Set Point_ChampionPosition[2] = (Position of Unit_Champion[2])
          • Unit - Order Unit_Dummy[(Player number of (Triggering player))] to Orc Tauren Chieftain - Shockwave Point_ChampionPosition[2]
        • Else - Actions
          • Unit - Create 1 Dummy for (Triggering player) at Point_ChampionPosition[(Player number of (Triggering player))] facing (Position of Unit_Champion[1])
          • Set Unit_Dummy[(Player number of (Triggering player))] = (Last created unit)
          • Animation - Change Unit_Dummy[(Player number of (Triggering player))]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
          • Unit - Add Dummy Spell - Fire Conjurer Attack to Unit_Dummy[(Player number of (Triggering player))]
          • Unit - Order Unit_Dummy[(Player number of (Triggering player))] to Orc Tauren Chieftain - Shockwave Point_ChampionPosition[1]
      • Wait 0.80 seconds
      • Set Boolean_Attacking[(Player number of (Triggering player))] = False
      • Trigger - Run Move After Attack <gen> (checking conditions)
Everything works, except for the spell cast itself. I tried it with a Thunder Clap dummy spell, and that one works. This one (that should target a point) just doesn't want to. What have I done wrong?

It's supposed to work the following way:
if the player presses Q (which is the hotkey for attack), the players can see the champion's attack animation, and a dummy unit should be created to launch a projectile in a line. I know that a dummy in this case might not be important, because I could just simply add the spell to the champion itself (because it's not the champion that the player has selected), but I need to do it this way because of further abilities that will be done the same way.

Any help would be greatly appreciated.
 
Triggering player is wrong reference here. You should use variable for Owner of (Triggering unit) and use it instead.

I dont see where you set Unit_champion[1] and Unit_champion[2]. Similar situation happens to second condition (after condition with ability being cast), meaby i just dont know what are you trying to do, but couldnt you use Unit type of (Triggering unit) Equal to Fire Conjurer instead?
 
Level 9
Joined
Jun 1, 2008
Messages
180
Like I said, I tried it with "Thunder Clap" instead of "Dummy Spell - Fire Conjurer Attack", and that worked. It also turns the dummy invisible, so the whole trigger works, except for the spell cast. It doesn't cast the spell for some reason. I also tried it with "Carrion Swarm", just to see whether I screwed up something in the dummy spell, but it doesn't work either.

By the way, which leaks do you mean? Removing the dummy unit? I'll do that later.
 
Level 9
Joined
Jun 1, 2008
Messages
180
Yep, it does. The problem was that I was silly enough to set the "Abyss" tile on the whole map. Most units were placed by triggers, so they were still able to move, even though they weren't flying units, but the poor dummy couldn't cast the spell that's targeting a point. Funny thing is, that it could cast one that doesn't need a target... Oh well, another lesson learned!
 
Status
Not open for further replies.
Top