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

Attack Spell

Status
Not open for further replies.
Level 5
Joined
Apr 11, 2011
Messages
107
heres what i got:

  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack!
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Range Box <gen> contains (Last created unit)) Equal to True
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Last created unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Animation - Play Fighter's attack animation
          • Wait 1.00 seconds
          • Animation - Reset Fighter's animation
        • Else - Actions
          • Animation - Play Fighter's attack animation
          • Wait 1.00 seconds
          • Animation - Reset Fighter's animation


is there a better way to do this? what ive got is essentally a dummy unit casting a dummy spell to make my "Fighter" play his attack animation and damage "last created unit" if its within 150 (for now its a region roughly 300x300) of "Fighter". "Fighter" will only be faceing left or right.
 
Use triggering unit in the triggers, your variable make the spell not Mui.

Use the line "Animations Names" in the object to display correctly the action.

Also, don't use regions for detect if a unit is in a circle, but use an unit group :

  • Set PointVar = Position of Triggering Unit
  • Set UnitGroupVar = Units within 150 of PointVar
  • If (Last Created Unit) is in UnitGroupVar Equal To True Then Cause (Triggering unit) to damage (Last created unit), dealing 500 damages of... Else [Nothing or a Floating Text showing "Miss"]
  • Custom Script : call RemoveLocation(udg_PointVar)
  • Custom Script : call DestroyGroup(udg_UnitGroupVar)
 
Level 5
Joined
Apr 11, 2011
Messages
107
first, i dont know what mui is :( sorta new to all this.
second, heres what i have now (map attached)


what do i need to change?
 

Attachments

  • Lone Murloc.w3x
    25.8 KB · Views: 53
Level 5
Joined
Apr 11, 2011
Messages
107
The way this map works is you press the arrow keys to move the fighter left and right. You always have a dummy unit selected with dummy spells that cause a seccond dummy unit to cast spells at the aera of the fighter, such as the attack spell. The effects are from the dummy caster, but the animation is from the fighter. If that makes since.... if not, give the map a quick try
 
Level 13
Joined
Sep 29, 2008
Messages
672
But who is the one with the spell? If the fighter is the one who casts the spell then it should work.
Otherwise, i guess making him animate is the only way.

In your trigger it's better this way:

  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack!
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Range Box <gen> contains (Last created unit)) Equal to True
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Last created unit), dealing 500.00 damage of attack type Spells and damage type Normal
        • Else - Actions
      • Animation - Play Fighter's attack animation
      • Wait 1.00 seconds
      • Animation - Reset Fighter's animation
Since you're playing the animation on both conditions, just remove it from the if then else.
 
Level 5
Joined
Apr 11, 2011
Messages
107
Ok. The whole game you have a farm (dummy) selected. It has a few spells (all dummies). You click a spell, it causes a seccond dummy to cast the spells on the position of "Fighter". So fighter itself really does nothing but take damage act as a aimer for the dummy spell caster. But the whole time it looks like the fighter is doing all the work. I can't think of anything I can compare it to.. (you'd just have to test the map and see ;), use the left and right arrow keys, a to attack, and r to cast monsoon.)
 
Status
Not open for further replies.
Top