• 🏆 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!

[Trigger] Phoenix Fire AoE

Status
Not open for further replies.
Level 8
Joined
Jun 28, 2008
Messages
356
You can make a trigger that activates every 1.00 second for example and moves a hidden dummy unit to the position of the caster and cast some custom AoE spell with the phoenix fire projectile to a random unit withing N range.
 
Level 8
Joined
Jun 28, 2008
Messages
356
  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of YOUR_PHOENIX_FIRE_ABILITY for (Picked unit)) Greater than 0
            • Then - Actions
              • Set loc = (Position of (Picked unit))
              • Set owned = (Units within YOUR_MAX_RANGE of loc)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (owned is empty) Equal to False
                • Then - Actions
                  • Unit - Unpause dummy_caster
                  • Unit - Move dummy_caster instantly to loc
                  • Unit - Order dummy_caster to Attack Once (Random unit from owned)
                  • Unit - Pause dummy_caster
                • Else - Actions
              • Custom script: call DestroyGroup(udg_owned)
              • Custom script: call RemoveLocation(udg_loc)
            • Else - Actions
And somewhere in the initialization trigger create the invisible dummy unit and store it inside dummy_caster and pause it. I hope you get my point. Anyways, this code sucks, since it's GUI and it's uber unoptimized and slow. You should really learn JASS.
 
Level 5
Joined
Jan 4, 2007
Messages
103
That or create a custom spell that will create a dummy which will attack a random unit from a unit group near your hero, the attacking unit will have the same Missile as Phoenix Fire, and do the same for all units near your hero. That way you will get Position of Attacked Unit and it will look similiar to phoenix fire. Or you could do a trigger which will detect if a unit has a buff of type Phoenix Fire and do actions, here:
  • Events
    • Time - Every 0.50 seconds of game time
  • Conditions
  • Actions
    • Set HeroPoint = (Unit (Position of Your Hero))
    • Set HeroGroup = (Units in (Region centered at (HeroPoint)) with size (600.00, 600.00)))
    • Unit Group - Pick every unit in (HeroGroup) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) has buff Phoenix Fire ) Equal to True
          • Then - Actions
            • Unit - Remove Phoenix Fire buff from (Picked unit)
            • Your Actions
          • Else - Actions
    • Custom script: call RemoveLocation (udg_HeroPoint)
    • Custom script: call DestroyGroup (udg_HeroGroup)
Well thx for the below post:)
 
Last edited:
Level 8
Joined
Jun 28, 2008
Messages
356
That or create a custom spell that will create a dummy which will attack a random unit from a unit group near your hero, the attacking unit will have the same Missile as Phoenix Fire, and do the same for all units near your hero. That way you will get Position of Attacked Unit and it will look similiar to phoenix fire. Or you could do a trigger which will detect if a unit has a buff of type Phoenix Fire and do actions, here:
  • Events
    • Time - Every 0.50 seconds of game time
  • Conditions
  • Actions
    • Set HeroPoint = (Unit (Position of Your Hero))
    • Unit Group - Pick every unit in (Units in (Region centered at (HeroPoint)) with size (600.00, 600.00))) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) has buff Phoenix Fire ) Equal to True
          • Then - Actions
            • Unit - Remove Phoenix Fire buff from (Picked unit)
            • Your Actions
          • Else - Actions
    • Custom script: call RemoveLocation (udg_HeroPoint)

Your trigger leaks at "Pick every unit..." and so does mine :)
 
Status
Not open for further replies.
Top