• 🏆 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] Help

Status
Not open for further replies.
Level 6
Joined
Sep 19, 2007
Messages
215
K well i really suck at triggers i know that now, but i have a problem when i cast my spell my hero dispears and my dummy unit for the spell model stays there and does nothing how come, here is the trigger:
  • Magic Ball
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Magic Ball
    • Actions
      • Unit - Create 1 Magic Ball [Spell] for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Target point of ability being cast)
      • Unit Group - Pick every unit in (Units within 100.00 of (Position of (Casting unit))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Move To (Target point of ability being cast)
          • Animation - Play (Picked unit)'s Death animation
          • Unit - Remove (Picked unit) from the game
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 125.00 damage of attack type Spells and damage type Normal
 
Level 22
Joined
Feb 26, 2008
Messages
891
You have a few problems with this trigger.

1. It leaks in several places.
2. You are giving an order, then playing an animation, then removing the unit instantly. The last thing that happens in removing the unit, so you won't see anything but that.
3. Your Pick Every Unit action will inevitably include the hero the way you set it up.
 
Level 22
Joined
Feb 26, 2008
Messages
891
I really don't think you can get this trigger to do what you want very easily....
It would need a major rewrite.

This MIGHT work somewhat how you want. I'm not really sure what you are trying to do there....
  • Magic Ball
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempPoint2 = (Target point of ability being cast)
      • Unit - Create 1 Footman for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Set TempGroup = (Units within 100.00 of TempPoint matching (((Matching unit) is A Hero) Equal to False))
      • Set SomeInt = 0
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set SomeInt = (SomeInt + 1)
          • Set UnitArray[SomeInt] = (Picked unit)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • For each (Integer A) from 1 to SomeInt, do (Actions)
        • Loop - Actions
          • Unit - Order UnitArray[(Integer A)] to Move To TempPoint2
          • Wait until ((Current order of UnitArray[(Integer A)]) Equal to (Order(none))), checking every 0.25 seconds
          • Unit - Kill UnitArray[(Integer A)]
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 100.00 at TempPoint2, dealing 100.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_TempPoint2)
 
Level 6
Joined
Sep 19, 2007
Messages
215
well i want the cast to make a magic ball[unit] like hes charing his magic into that ball, and then he shoots it towards the unit it hits him plays wisp animation death, and does the amount of damage to target. And for the temp point variable what kind is it? and what does someint do?
 
Status
Not open for further replies.
Top