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

Question

Status
Not open for further replies.
Level 6
Joined
May 4, 2012
Messages
187
Hello everybody! I am new to modding, and coding (ofcourse I am a newb). And I have a question right here. Why does this trigger doesn't work?
  • Soul Blast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Soul Blast
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Enslaver for (Casting unit)) Equal to 1
        • Then - Actions
          • Set SB_Damage = (10.00 x (SE_Souls + 100.00))
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
          • Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing SB_Damage damage of attack type Spells and damage type Normal
          • Animation - Change (Target unit of ability being cast) turn speed to 0.30
          • Wait 5.00 seconds
          • Animation - Change (Target unit of ability being cast) turn speed to 1.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Enslaver for (Casting unit)) Equal to 2
        • Then - Actions
          • Set SB_Damage = (12.00 x (SE_Souls + 190.00))
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
          • Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing SB_Damage damage of attack type Spells and damage type Normal
          • Animation - Change (Target unit of ability being cast) turn speed to 0.30
          • Wait 5.00 seconds
          • Animation - Change (Target unit of ability being cast) turn speed to 1.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Soul Enslaver for (Casting unit)) Equal to 3
        • Then - Actions
          • Set SB_Damage = (14.00 x (SE_Souls + 280.00))
          • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
          • Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing SB_Damage damage of attack type Spells and damage type Normal
          • Animation - Change (Target unit of ability being cast) turn speed to 0.30
          • Wait 5.00 seconds
          • Animation - Change (Target unit of ability being cast) turn speed to 1.00
        • Else - Actions
+rep will be given. Thanks in advance! :ogre_haosis:
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
begins casting ability -> starts the effect of ability
casting unit -> triggering unit
also this ifs can be changed to one with Level of Soul Enslaver for Triggering Unit is higher then or equal to 1
just instead of cheking for lvl do
  • Set SB_Damage = (8. + (real(Level of Soul Enslaver for Triggering unit)) x (SE_Souls + 10. + 90. x (real(Level of Soul Enslaver for Triggering Unit))))
also you should set turn speed of unit to variable because most units have different turn rates
Also instead of creating a unit to damge him you can directly damage the unit using Cause Triggering Unit ...


Hope it helps
 
Level 5
Joined
Sep 27, 2011
Messages
141
Set target unit of ability being cast to a variable at the start and use that instead of saying target unit of ability being cast every time try to avoid using wait otherwise it will not be mui without local variables and it is not necessary to have a different if then else for every level just use (8+(2xLevel)x(SE_Souls+(100+(30xlevel)) that should do the same thing for damage but u only need 1 then no need to repeat yourself and also set the point were your dummy is created to a variable then remove it after it is used or it will leak
 
Just came to point out that waits =/= not MUI, Waits == Inconsistent, this is how you make things with waits but remain MUI without the use of local variables:

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/mui-triggers-waits-218354/

Anyway, on the matter of the spell actually just not working, and how you should avoid the wait or make the wait MUI (which you should click the link above for) I'm wondering where SE_Souls is set since I do not see it being set in that trigger, which would mean it either always has the value of 0, or just is set elsewhere, but it's curious to me. As said previously you don't need the dummy at all, just get the triggering unit to deal the damage but other than that I do not see another issue with it, may I ask why you're changing units turn speeds though?
 
Level 6
Joined
May 4, 2012
Messages
187
Meh... I already fixed it... But thanks for giving me the link about that MUI triggers with waits... Also I did not show all of the triggers, maybe I forgot it haha... The SE_Souls is the units pawned by the hero.... Also I want to change turn spees because it somewhat "delays" them when they move... Sorry for the necroing...
 
Status
Not open for further replies.
Top