• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] My Spell doesn't work...

Status
Not open for further replies.
Level 4
Joined
Aug 15, 2010
Messages
53
  • Magical Axes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Magical Axes
    • Actions
      • Set HammerAcisi = 0.00
      • Set HammerHedef[1] = (Position of (Target unit of ability being cast))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set HammerHedef[2] = (HammerHedef[1] offset by 300.00 towards HammerAcisi degrees)
          • Unit - Create 1 Dummy (Magical Axes) for (Owner of (Triggering unit)) at HammerHedef[2] facing Default building facing degrees
          • Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
          • Unit - Set level of Magical Axe (Dummy) for (Last created unit) to (Level of Magical Axes for (Triggering unit))
          • Set HammerAcisi = (HammerAcisi + 36.00)
          • Wait 0.10 seconds
      • Custom script: call RemoveLocation (udg_HammerHedef[1])

The System doesn't work. How can I correct it?
I tried this triggers but... I need some help, please. :vw_sad:

I want to form 10 dummy in round shape and make it use storm bolt each of them.
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
Next time when you upload triggers, use [ TRIGGER ] [/ TRIGGER] tags. (without the spaces in it ;)

Your trigger is this:
  • Magical Axes
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Magical Axes
    • Actions
      • Set HammerAcisi = 0.00
      • Set HammerHedef[1] = (Position of (Target unit of ability being cast))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set HammerHedef[2] = (HammerHedef[1] offset by 300.00 towards HammerAcisi degrees)
          • Unit - Create 1 Dummy (Magical Axes) for (Owner of (Triggering unit)) at HammerHedef[2] facing Default building facing degrees
          • Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
          • Unit - Set level of Magical Axe (Dummy) for (Last created unit) to (Level of Magical Axes for (Triggering unit))
          • Set HammerAcisi = (HammerAcisi + 36.00)
          • Wait 0.10 seconds
      • Custom script: call RemoveLocation (udg_HammerHedef[1])
About the problem... can you explain what happens wrong or what doesnt happen?
 
Level 4
Joined
Aug 15, 2010
Messages
53
sorry, my fault. Problem;
All dummies are creating but only first dummy use to storm bolt ability.
And using to "Magical Axes", first run, creating 8 or 2 dummy around the enemy.

Magical Axes = Channel (Unit Target, Visible)
Dummy = Locust, Invulnerable, Fly, 200 Heigh, 0 movespeed
Magic Axe (Dummy) = Storm Bolt, 4 level, unit ability, 1 sec stun, Stun Buff
 
Level 19
Joined
Jul 14, 2011
Messages
875
Pretty sure it is because of the wait. (Target unit of ability being cast), to be more specific.

You can try just saving it in a variable before the loop if you dont care about the spell being MUI.

Also, Owner of (Triggering unit) -> Triggering Player;
  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
  • Unit - Set level of Magical Axe (Dummy) for (Last created unit) to (Level of Magical Axes for (Triggering unit))
->
  • Unit - Set level of Magical Axe (Dummy) for (Last created unit) to (Level of Magical Axes for (Triggering unit))
  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt <Target unit of ability being cast in a variable>
E: Oh, and put call RemoveLocation (udg_HammerHedef[2]) at the end of the loop.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
at the start of the trigger, create this "Custom Script: local unit udg_TempUnit = GetSpellTargetUnit()"
Make a global variable of type unit and name it "TempUnit".
Use that instead of the Target unit of ability being cast.
At the end of the trigger create this: "Custom Script: set udg_TempUnit = null"
 
Level 4
Joined
Aug 15, 2010
Messages
53
sry, I have a question

  • Call Spirits
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Call Spirits
    • Actions
      • Set CallSpiritAngle = 0.00
      • Set CallSpiritTargetPoint[1] = (Position of (Target unit of ability being cast))
      • Set CallSpiritTarget = (Target unit of ability being cast)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set CallSpiritTargetPoint[2] = (CallSpiritTargetPoint[1] offset by 300.00 towards CallSpiritAngle degrees)
          • Unit - Create 1 Dummy (Call Spirits) for (Owner of (Triggering unit)) at CallSpiritTargetPoint[2] facing Default building facing degrees
          • Set CallCaster = (Last created unit)
          • Unit - Add a 0.50 second Generic expiration timer to CallCaster
          • Unit - Set level of Call Spirits (Dummy) for CallCaster to (Level of Call Spirits for (Triggering unit))
          • Unit - Order CallCaster to Human Mountain King - Storm Bolt CallSpiritTarget
          • Set CallSpiritAngle = (CallSpiritAngle + 36.00)
          • Custom script: call RemoveLocation (udg_CallSpiritTargetPoint[2])
          • Wait 0.01 seconds
      • Set CallCaster = No unit
      • Custom script: call RemoveLocation (udg_CallSpiritTargetPoint[1])
oke, I use this trigger and realy work but I used to Call Spirits and when I moved my hero, only creating 3 - 8 dummy... What can I do?
 
Status
Not open for further replies.
Top