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

Making a spell MUI

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2008
Messages
253
Can anyone help me with making a spell MUI? Because I just can't find out how I should do it...

Here is what I got:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Nether Bomb
  • Actions
    • Set temp_unit = (Casting unit)
    • Set temp_player = (Owner of temp_unit)
    • Set temp_point = (Position of temp_unit)
    • Set temp_point2 = (Target point of ability being cast)
    • Unit - Create 1 dummy - missile for (Owner of temp_unit) at (temp_point offset by 60.00 towards (Facing of temp_unit) degrees) facing Default building facing degrees
    • Set temp_unit_spawned = (Last created unit)
    • Unit - Order temp_unit_spawned to Move To temp_point2
    • Unit - Add a ((Distance between temp_point and temp_point2) / 250.00) second Generic expiration timer to temp_unit_spawned
    • Wait ((Distance between temp_point and temp_point2) / 250.00) seconds
    • Unit - Create 1 dummy - explosion for (Owner of temp_unit) at temp_point2 facing Default building facing degrees
    • Set temp_unit_spawned2 = (Last created unit)
    • Unit - Add a 1.00 second Generic expiration timer to temp_unit_spawned2
    • Unit Group - Pick every unit in (Units within 400.00 of temp_point2 matching (((Matching unit) belongs to an ally of temp_player) Equal to False)) and do (Actions)
      • Loop - Actions
        • Set temp_unit_target = (Picked unit)
        • Unit - Cause temp_unit to damage temp_unit_target, dealing 200.00 damage of attack type Spells and damage type Normal
    • Custom script: set udg_temp_unit = null
    • Custom script: set udg_temp_player = null
    • Custom script: call RemoveLocation(udg_temp_point)
    • Custom script: call RemoveLocation(udg_temp_point2)
    • Custom script: set udg_temp_unit_spawned = null
    • Custom script: set udg_temp_unit_spawned2 = null
    • Custom script: set udg_temp_unit_target = null
Thanks in advance, Quetzalcotl
 

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
Use the expiration timer of the dummy unit instead of the wait. Then use a seond trigger and make it trigger when the dummy dies. Add the second part of your trigger to this new trigger.

btw: you are leaking one location and one group and all those set xXx = null are useless.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Well, it takes 2 triggers, at least, i think it is best to do,, one that starts, one that is periodic,,
I guess that '250' in the wait is the movement speed of the missile?
Let me do it for you =)

Dang! too late,,
peq's idea is probably better, since it does not use a periodic timer,,
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Here it is,,
you did 2 things wrong:
1) You turned the 'unit dies' trigger initially off, which had to be turned on,,
2) You made a wrong condition in the 'unit dies' trigger,, which was:
  • (Unit-type of (Dying Unit)) equal to dummy - explosion
but it had to be:
  • (Unit-type of (Dying Unit)) equal to dummy - missile
have fun with it ;)

-Yixx,,-
 

Attachments

  • (0) Quetzalcotl Nether Bomb.w3x
    22.9 KB · Views: 48
Status
Not open for further replies.
Top