• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Spell] How to move a unit (dummy), like projection in a missile

Status
Not open for further replies.
Level 8
Joined
Sep 16, 2016
Messages
227
Whats the function to use to move my dummy unit from caster to target? The ability work essentially like Shockwave

The moving itself will be in a loop, every 0.03s
 
Level 6
Joined
Mar 27, 2019
Messages
56
Here is a short Trigger that works how you described it, atleast I think so

Point = Temp_Point
Point = Temp_Point2
Unit = Temp_Unit
Unit Group = Temp_Group
Unit Group = Shockwave_Group


--Create Unit named Shockwave (Dummy)--
--Create Ability named Shockwave--
  • Shockwave Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave Dummy
    • Actions
      • Set VariableSet Temp_Point = (Target point of ability being cast)
      • Set VariableSet Temp_Point2 = (Position of (Triggering unit))
      • Unit - Create 1 Shockwave (Dummy) for Neutral Passive at Temp_Point2 facing (Angle from Temp_Point2 to Temp_Point) degrees
      • Unit - Move (Last created unit) instantly to Temp_Point2, facing Temp_Point
      • Custom script: call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
      • Unit - Change ownership of (Last created unit) to (Owner of (Triggering unit)) and Retain color
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Add (Last created unit) to Shockwave_Group
      • Trigger - Turn on Shockwave Group <gen>
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
  • Shockwave Group
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Shockwave_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet Temp_Point = (Position of (Picked unit))
          • Set VariableSet Temp_Point2 = (Temp_Point offset by 10.00 towards (Facing of (Picked unit)) degrees.)
          • Unit - Move (Picked unit) instantly to Temp_Point2, facing (Facing of (Picked unit)) degrees
          • -------- You can add the Damage Part here --------
          • Set VariableSet Temp_Group = (Units within 128.00 of Temp_Point matching ((((Matching unit) is alive) Equal to Wahr) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit)).) Equal to Wahr)).)
          • Set VariableSet Temp_Unit = (Picked unit)
          • Unit Group - Pick every unit in Temp_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Temp_Unit to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Normal
              • -------- Maybe add an Checkup if Target was already damaged. --------
          • Custom script: call DestroyGroup(udg_Temp_Group)
          • Custom script: call RemoveLocation(udg_Temp_Point)
          • Custom script: call RemoveLocation(udg_Temp_Point2)
  • Shockwave Expiration
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Shockwave (Dummy)
    • Actions
      • Unit Group - Remove (Triggering unit) from Shockwave_Group.
      • Unit - Remove (Triggering unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Shockwave_Group) Less than or equal to 0
        • Then - Actions
          • Trigger - Turn off Shockwave Group <gen>
        • Else - Actions

If that's too complicated download the Map I attached to get a proper look, if you still do not understand how this works at all, refer to look up some Tutorials!
Have a good day.
 

Attachments

  • Shockwave Dummy.w3m
    20.7 KB · Views: 10
Level 44
Joined
Feb 27, 2007
Messages
5,567
Don't reinvent the wheel if you don't have to:

 
Status
Not open for further replies.
Top