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

Sphere Buffs

Status
Not open for further replies.
Level 12
Joined
May 12, 2012
Messages
631
Hello there people of Hive :grin:

to make it short, I want the Phoenix Fire ability instead of burning the enemy it freezes them (slow, not literally freeze) and another Phoenix Fire ability, instead of burning again it stuns the enemy for 1 second

is that possible?

Thanks in advance :xxd::xxd::xxd:
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Those 2 spells need to be triggered. You can't just use the good ol' Object Editor for that :(

Here is a simple how-to: Every interval picks an enemy, create a missile at the caster's position and use a periodic trigger to move it towards the target. When the distance is small enough (i.e hit) kill the dummy and apply whatever effect you need.

It is also quite complex in nature due to the fact that you need to move multiple missiles at the same time continuously. Thus it has to use GUI indexing or be coded in JASS/vJASS.
 
Level 5
Joined
Nov 30, 2012
Messages
200
I made the first one work with simple triggers, a custom dummy unit, and a little ability edit.

Here's the initialization trigger. The Rifleman is a dummy unit with the Frost Breath ability, which has been edited to have 2.00 second duration.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Neutral Passive emitting Visibility across (Entire map)
      • Unit - Create 1 Rifleman for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
      • Set cold_attack = (Last created unit)
Here's the next trigger:

  • Phoenix Fire Slow
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (temp_unit has buff Phoenix Fire) Equal to True
            • Then - Actions
              • Unit - Order cold_attack to Attack temp_unit
            • Else - Actions
              • Unit - Remove Slowed buff from temp_unit
And the next one, which makes sure that the Cold Attack doesn't last forever. I don't know if the wait will cause a leak, however. Can someone check this?

  • Phoenix Fire Slow Stop
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to cold_attack
    • Actions
      • Wait 0.04 seconds
      • Unit - Order cold_attack to Stop
I don't know if I would be able to do the second one, but I might try.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I made the first one work with simple triggers, a custom dummy unit, and a little ability edit.

Here's the initialization trigger. The Rifleman is a dummy unit with the Frost Breath ability, which has been edited to have 2.00 second duration.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Neutral Passive emitting Visibility across (Entire map)
      • Unit - Create 1 Rifleman for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
      • Set cold_attack = (Last created unit)
Here's the next trigger:

  • Phoenix Fire Slow
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (temp_unit has buff Phoenix Fire) Equal to True
            • Then - Actions
              • Unit - Order cold_attack to Attack temp_unit
            • Else - Actions
              • Unit - Remove Slowed buff from temp_unit
And the next one, which makes sure that the Cold Attack doesn't last forever. I don't know if the wait will cause a leak, however. Can someone check this?

  • Phoenix Fire Slow Stop
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to cold_attack
    • Actions
      • Wait 0.04 seconds
      • Unit - Order cold_attack to Stop
I don't know if I would be able to do the second one, but I might try.
Wait is never less than 0.27 seconds.
Also, you can just dummy cast a slow buff and use a periodic trigger to check when the unit loses the buff.
 
Level 5
Joined
Nov 30, 2012
Messages
200
I updated this so that it works better and can handle many units at a time.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Neutral Passive emitting Visibility across (Entire map)
      • Set playable_map_area = (Playable map area)
  • Phoenix Fire Slow
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in playable_map_area) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • Set temp_point = (Position of temp_unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (temp_unit has buff Phoenix Fire) Equal to True
            • Then - Actions
              • Unit - Create 1 Rifleman for Neutral Passive at temp_point facing Default building facing degrees
              • Set cold_attack = (Last created unit)
              • Unit - Order cold_attack to Attack temp_unit
            • Else - Actions
              • Unit - Remove Slowed buff from temp_unit
      • Custom script: call RemoveLocation( udg_temp_point )
  • Phoenix Fire Slow Stop
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Rifleman
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Phoenix Fire) Equal to False
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
  • Debug
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Rifleman) and do (Unit - Remove (Picked unit) from the game)
Also, I made the Rifleman have 60 second cooldown so it only attacks once during its lifetime. I think that would be all the changes I made and now it doesn't leak.

Edit: I noticed that even with the expiration timer, the riflemen still existed, so I made a fix and it still works.
 
Last edited:
Level 5
Joined
Nov 30, 2012
Messages
200
Sorry, I think I may have forgotten to explain that the Rifleman is a dummy unit, meaning you should set its model file to "none.mdl" and set its attack range to 10000. It works fine for me. You can always do a little tweaking to make it to your liking. Also, did you follow the most recent triggers that I posted?

Edit: Here's a link to the map. http://www.hiveworkshop.com/forums/pastebin.php?id=l65s3v

Edit edit: Change the last trigger "Debug" to look like this: (For some reason the riflemen weren't being removed but now it totally works.)

  • Debug
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Rifleman) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • Unit - Remove temp_unit from the game
 
Last edited:
Level 21
Joined
Mar 27, 2012
Messages
3,232
Sorry, I think I may have forgotten to explain that the Rifleman is a dummy unit, meaning you should set its model file to "none.mdl" and set its attack range to 10000. It works fine for me. You can always do a little tweaking to make it to your liking. Also, did you follow the most recent triggers that I posted?

Edit: Here's a link to the map. http://www.hiveworkshop.com/forums/pastebin.php?id=l65s3v

Edit edit: Change the last trigger "Debug" to look like this: (For some reason the riflemen weren't being removed but now it totally works.)

  • Debug
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Rifleman) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • Unit - Remove temp_unit from the game

Never use a periodic trigger to remove dummies. :goblin_boom:

What should be done is giving a timed life to the dummy when it's created. Takes less power and works without errors.
 
Level 12
Joined
May 12, 2012
Messages
631
IT LIVES!!! thanks alot man :thumbs_up:

Never use a periodic trigger to remove dummies. :goblin_boom:

What should be done is giving a timed life to the dummy when it's created. Takes less power and works without errors.
Yeah... I think this is more efficient, so you just add this right?
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
I can help you code this in JASS (sorry I don't do GUI) so what do you think?
It's finished, thanks for offering your help :xxd:

btw, the "Slowed" buff isn't being remove

can you also do the second request? the one with the stun :thumbs_up:
 
Last edited:
Level 5
Joined
Nov 30, 2012
Messages
200
Huh... I tried using the generic timer but it didn't remove the riflemen (I know because I made a trigger to say how many riflemen there were every second). They just didn't disappear. Weird. Anyways, I'm glad the Phoenix Fire Slow works for you. Now to get onto the stunning one...
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Huh... I tried using the generic timer but it didn't remove the riflemen (I know because I made a trigger to say how many riflemen there were every second). They just didn't disappear. Weird. Anyways, I'm glad the Phoenix Fire Slow works for you. Now to get onto the stunning one...

I've never used the generic timer, I always use raise dead and it works.
 
Status
Not open for further replies.
Top