• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Why this trigger not working?

Status
Not open for further replies.
Level 4
Joined
Aug 18, 2011
Messages
73
hello everyone
i tried to create an Gui spell yesterday, there is a problem on it but this should work well cuz i create 2part of it from my last spell which is working well
the problem is my dummy unit wont do the order it just move instantly to target
  • Arcane Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Beacon
    • Actions
      • -------- Setting --------
      • Set Spells_AB_Caster = (Triggering unit)
      • Set Spells_AB_Owner = (Owner of Spells_AB_Caster)
      • Set Spells_AB_Point1 = (Position of Spells_AB_Caster)
      • Set Spells_AB_TargetUnit = (Target unit of ability being cast)
      • Unit Group - Add Spells_AB_TargetUnit to Spells_AB_TargetGroup
      • Set Spells_AB_Point2 = (Position of Spells_AB_TargetUnit)
      • Set Spells_AB_Level = (Level of (Ability being cast) for Spells_AB_Caster)
      • Unit - Create 1 AB_Dummy for Spells_AB_Owner at Spells_AB_Point1 facing Default building facing degrees
      • Set Spells_AB_Dummy = (Last created unit)
      • Unit Group - Add (Last created unit) to Spells_AB_Group
      • Unit - Turn collision for Spells_AB_Dummy Off
      • Set Spells_AB_DmgPerHit = (Real(((Intelligence of Spells_AB_Caster (Include bonuses)) x ((Integer(3.50)) x (Level of (Ability being cast) for Spells_AB_Caster)))))
      • -------- HashTables --------
      • Hashtable - Save Handle OfSpells_AB_Caster as 1 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle OfSpells_AB_Owner as 2 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle OfSpells_AB_Point1 as 3 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle OfSpells_AB_TargetUnit as 4 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle OfSpells_AB_Point2 as 5 of (Key (Last created unit)) in Hash
      • Hashtable - Save Spells_AB_Level as 6 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle OfSpells_AB_Dummy as 7 of (Key (Last created unit)) in Hash
      • Hashtable - Save Spells_AB_DmgPerHit as 8 of (Key (Last created unit)) in Hash
      • -------- Extras --------
      • Trigger - Turn on Arcane Blast Loop <gen>

  • Arcane Blast Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (Number of units in Spells_AB_Group) Greater than 0
    • Actions
      • Unit Group - Pick every unit in Spells_AB_Group and do (Actions)
        • Loop - Actions
          • -------- Loading HashTables --------
          • Set Spells_AB_Dummy = (Picked unit)
          • Set Spells_AB_Caster = (Load 1 of (Key (Picked unit)) in Hash)
          • Set Spells_AB_Owner = (Load 2 of (Key (Picked unit)) in Hash)
          • Set Spells_AB_Point1 = (Load 3 of (Key (Picked unit)) in Hash)
          • Set Spells_AB_TargetUnit = (Load 4 of (Key (Picked unit)) in Hash)
          • Set Spells_AB_Point2 = (Load 5 of (Key (Picked unit)) in Hash)
          • Set Spells_AB_Level = (Load 6 of (Key (Picked unit)) from Hash)
          • Set Spells_AB_DmgPerHit = (Load 8 of (Key (Picked unit)) from Hash)
          • -------- Cast --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Spells_AB_Caster is alive) Equal to True
            • Then - Actions
              • Animation - Change Spells_AB_Dummy's animation speed to 200.00% of its original speed
              • Unit - Order Spells_AB_Dummy to Orc Tauren Chieftain - Shockwave Spells_AB_Point2
              • Unit - Move Spells_AB_Dummy instantly to Spells_AB_Point2
            • Else - Actions
              • -------- Remove Track --------
              • Unit Group - Pick every unit in Spells_AB_Group and do (Actions)
                • Loop - Actions
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hash
                  • Custom script: call RemoveLocation(udg_Spells_AB_Point1)
                  • Custom script: call RemoveLocation(udg_Spells_AB_Point2)
                  • Custom script: call DestroyGroup (udg_Spells_AB_Group)
                  • Trigger - Turn off (This trigger)
whats the problem in triggers?
please help me to solve it
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Move instantly -> stop order.

  • Unit - Move Spells_AB_Dummy instantly to Spells_AB_Point2
->
  • Custom script: call SetUnitX(udg_Spells_AB_Dummy, GetLocationX(udg_Spells_AB_Point2))
  • Custom script: call SetUnitY(udg_Spells_AB_Dummy, GetLocationY(udg_Spells_AB_Point2))
 
Level 4
Joined
Aug 18, 2011
Messages
73
are you sure? because i remove the unit-move instant as you saied but this time the dummy unit will create at point 1 without order! moving or.....
is other part of the trigger right ?
why its not get order someone tell me its important for me because im new in gui/mui spells
and why should i use commands (sorry but i easily forget the commands)
 
Level 4
Joined
Aug 18, 2011
Messages
73
Move instantly -> stop order.

  • Unit - Move Spells_AB_Dummy instantly to Spells_AB_Point2
->
  • Custom script: call SetUnitX(udg_Spells_AB_Dummy, GetLocationX(udg_Spells_AB_Point2))
  • Custom script: call SetUnitY(udg_Spells_AB_Dummy, GetLocationY(udg_Spells_AB_Point2))


not worked :ogre_frown:
the dummy unit will be created in caster`s location and just stop at there with out doing the order
 
Level 4
Joined
Aug 18, 2011
Messages
73
Possible reasons:
  • The unit doesn't have enough mana
  • The unit cast point is above 0.03, meaning that every time you order the ability it will be cancelled because of this
  • The location of the picked point cannot be targeted by Shockwave

1-caster unit no need mana because i set spell`s mana requirement to 0
2-misunderstood ,i changed the 0.3to 0.5 and i changed the order to
  • Unit - Order Spells_AB_Dummy to Neutral - Breath Of Frost Spells_AB_Point2
but still it will be created at casters point without doing anything whats the problem on the spell that cancel the order?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
you are executing the spell too fast, change the dummy's atribute in the object editor;
Animation - Cast backswing = 0
Animation - Cast Point = 0

and Maker is right;
SetUnitXY first then order the dummy to cast...

EDIT:
also add this below the creation of your dummy
  • Custom script: call UnitRemoveAbility(udg_AB_Dummy, 'Amov')
 
Level 15
Joined
Jul 6, 2009
Messages
889
Yes, as mckill2009 and I say, your unit will be ordered to cast faster than it can do it. Therefore it won't work at all because you keep ordering it before the previous can be done. The cast point attribute determines how long until the spell takes effect. The cast backswing attribute determines how long the unit remains in animation "casting" the spell after it takes effect (this is only for visuals).

Yes, also remove the Move ability so that the dummy caster doesn't have to worry about facing angles when casting.
 
Level 4
Joined
Aug 18, 2011
Messages
73
thanks all the order`s problem has been solved
but the only problem i got after triggering was how can i damage the (targeted unit)?
im using hashtables to store the data and loading datas in loop trigger
some times i must use (wait) because something like (damage) will be bug when you write it in loop trigger for example i want to damage a unit by ( hero`s Intelligent x3) this mean if your hero has 20 intelligent my target will be damaged about 60 guess what it will be damaged about 15000 when its looping and when i tried to put it on cast trigger the the damage will happend before effect i fixed it by a 0.03 wait .
but according to this it will devastate my mui
i cant use arrays because the were always so difficult and confused me as hell now can someone tell me how can i damage units in gui) without looping or imbalancing?
where must damage trigger to be ?( in cast trigger or in loop trigger)?
 
Status
Not open for further replies.
Top