Spell possibility . . .

Disclaimer: Right, so this is a thread where I'm asking if something is even possible, and if it is, I'd need some serious help :)

Got this ¨brilliant¨ idea for a spell, let's call it Amplification Field:
- Example hero has a simple Sheep ability.
- If the hero puts down the Field, and clicks on his Sheep ability, every enemy in the field get's sheeped.
- Sheep level detection determines casted aoe sheep, of course.

As I'm new to triggers, I only know how to make the AoE sheep trigger.

But how would you create one that detects if the field is down, and if the hero just pressed on the button to sheep (ideally the sheep would also go on cooldown).

Any help is appreciated! I might even make a WC3 themed meme as payment, if it work of course.

full
 
It can be done in multiple ways, but I would just create a dummy unit at the location of the unit that places the field, then when you use the sheep spell you make a temp unit group of units within X range of the dummy matching whatever conditions you want. If the units fulfill your desired conditions, and they are within your preferred range, then proceed with your AoE sheep spell.
 
Ohh so if I understand you right you want the sheep ability to be single target normally, and only AoE in the field. I thought you wanted a AoE spell that was unusable outside of the field.

Ok so you can remove the single target ability whenever you place the field and add an AoE version instead. Then run a periodic trigger to check the distance between the field caster and the field. If the field caster is outside of the field range you reverse the ability add/removal (remove AoE spell and replace it with the single target one).
 
Not even needed to be in the Field, since I plan it to have a short duration.
If the hero fails to cast his AoE sheep i that time, he will have the normal spell back.

Now one more issue, let's say the hero puts down the field, but gets rekt.
So now after respawn, he'll have the unusable AoE sheep ability, since his normal one was replaced.
Or am I wrong?
 
Now one more issue, let's say the hero puts down the field, but gets rekt.
So now after respawn, he'll have the unusable AoE sheep ability, since his normal one was replaced.
Or am I wrong?
You're right, but that's an easy fix. Just remove the AoE ability whenever the hero dies, and add back the single target one. Do an integer condition check to see if the level of the AoE ability is greater than 0, and if it is you make the appropriate changes.
 
Level 13
Joined
Oct 8, 2012
Messages
498
Here's the ability!!!
I understand that you might not want the hero turning into a sheep by being Polymorphed/Hexed/Voodoo, and instead function like Bear morph, but this is just an example so you know that your spell idea is POSSIBLE! Well it works exactly (at least from what I understand) how you described it anyway.

Now, Hashtables might now be your thing, but I put comments as instructions in every trigger so that you may learn how to use em. See, am I like the coolest!?
Hope it helps ;P
 

Attachments

  • SheepMaster.w3x
    12.6 KB · Views: 20
Here's the ability!!!
I understand that you might not want the hero turning into a sheep by being Polymorphed/Hexed/Voodoo, and instead function like Bear morph, but this is just an example so you know that your spell idea is POSSIBLE! Well it works exactly (at least from what I understand) how you described it anyway.

Now, Hashtables might now be your thing, but I put comments as instructions in every trigger so that you may learn how to use em. See, am I like the coolest!?
Hope it helps ;P
Thank you for the spell.

It's not quite what I meant, caster hero or friendlies should not be sheeped :D
But at least I have a base to work with.

The idea was for the hero to have a normal hex ability, just a sheep version of it.
And this ultimate ability ¨Field¨ should be able to transform his normal abilities, such as the sheep, into an AoE version (while the field is active).
Once again the catch is:
- sheep (hex) is a targeted ability
- while the field is active, the hero must have a simple click version of it
- so all enemies turn into sheep inside the field, instead of the caster having to target anything at all.

Instead of adding and removing the ability you should use the new functions to disable/enable the ability directly so it retains its level properly.
I'll explore this turn on and off trigger.
Guess the tricky part (for me) is adding the proper AoE version level ability...
 
Level 24
Joined
Aug 10, 2018
Messages
2,859
Edit:
Here's a map with a working example.
It uses two abilities to create the desired Sheep effect. It also has the Field ultimate ability since I needed to create that as well.

1st Sheep Ability: The ability your hero learns. This skill has no icon/effect once learned and serves purely as a visual skill to level up.

2nd Sheep Ability: The Sheep ability that you cast. This ability is based on Channel and has 8 levels. Levels 1-4 have Target Unit targeting and levels 5-8 have Instant targeting. It is added to your Hero upon learning the Sheep ability.

So when you cast the Field ultimate ability it changes the level of Sheep to be equal to it's current level + 4. This transforms the ability from a single target ability into an Instant ability. Then I do a real simple dummy + hex trigger to hex the proper amount of enemies.
  • Cast Sheep
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sheep (Cast)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Sheep (Cast) for (Triggering unit)) Less than 5
        • Then - Actions
          • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
          • -------- --------
          • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing Default building facing degrees
          • Set VariableSet Dummy = (Last created unit)
          • Unit - Add Sheep (Dummy) to Dummy
          • Unit - Set level of Sheep (Dummy) for Dummy to Sheep_Level
          • Unit - Order Dummy to Orc Shadow Hunter - Hex (Target unit of ability being cast)
          • Unit - Add a 1.00 second Generic expiration timer to Dummy
          • -------- --------
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions
          • Unit - Create 1 Dummy for (Triggering player) at Field_Point facing Default building facing degrees
          • Set VariableSet Dummy = (Last created unit)
          • Unit - Add Sheep (Dummy) to Dummy
          • Unit - Set level of Sheep (Dummy) for Dummy to Sheep_Level
          • Unit - Add a 1.00 second Generic expiration timer to Dummy
          • -------- --------
          • Set VariableSet TempGroup = (Units within 300.00 of Field_Point.)
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Triggering player).) Equal to True
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Mechanical) Equal to False
                • Then - Actions
                  • Unit - Order Dummy to Orc Shadow Hunter - Hex (Picked unit)
                • Else - Actions
          • Custom script: call DestroyGroup (udg_TempGroup)
Sheep level less than 5 is the single target version. Sheep level 5+ is the area of effect version.

The Field ability creates the Field_Point variable upon cast. That's what TempGroup references in the trigger above.
 

Attachments

  • Sheep Ability.w3m
    23.5 KB · Views: 22
Last edited:
Level 24
Joined
Aug 10, 2018
Messages
2,859
Holy fuck I have never noticed that Channel can have different target types per level. That's nuts.
Haha, I know! I was trying to change the target type with the ability field triggers when it dawned on me that I could just use different levels.
 
Edit:
Here's a map with a working example.
. . .

Works like a... charm, many thanks!
And even when the hero died it resets to targeted sheep!

So now that it's solved, ask me whatever you want regarding badly drawn memes or something like that:

full
 
Level 24
Joined
Aug 10, 2018
Messages
2,859
Here's an MUI version. Note that it will leak/bug out if you cast the Ultimate ability again while a previous cast is still active. So just make sure that it's cooldown is longer than it's duration.
 

Attachments

  • Sheep Ability MUI.w3m
    27.4 KB · Views: 13
Here's an MUI version. Note that it will leak/bug out if you cast the Ultimate ability again while a previous cast is still active. So just make sure that it's cooldown is longer than it's duration.
Thank you again.

That leak will not occur if two different players cast it at approximately same time?
 
Level 24
Joined
Aug 10, 2018
Messages
2,859
The issue only occurs if an individual unit casts Field again while it's previous Field is still active. As long as the cooldown is longer than the duration then you will have zero problems.

Note that it uses a Unit Indexer and you may already have one in your map. If you already use a Unit Indexer then you can delete the one in the folder as you only need one. If you've never used one before than I highly recommend looking into it. It allows you to make your spells MUI with barely any effort.
 
Last edited:
Top