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!
Animation - Change (Casting unit)'s size to (101.00%, 101.00%, 101.00%) of its original size
Wait 2.00 seconds
Animation - Change (Casting unit)'s size to (102.00%, 102.00%, 102.00%) of its original size
Wait 2.00 seconds
Animation - Change (Casting unit)'s size to (103.00%, 103.00%, 103.00%) of its original size
Wait 2.00 seconds
Animation - Change (Casting unit)'s size to (104.00%, 104.00%, 104.00%) of its original size
Wait 10.00 seconds
Animation - Change (Casting unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
This is a realy basic trigger though, I gues it could be done in a better way but I don't know about it.
U can use this for starters and throw in special effects and I gues you need to store the unit into a variable to make it a good spell.
Whoa that kinda looks realy complicated, could you like explain it a bit?
What the custum scripts do?
Btw, I can edit my version a bit so it works for multiple heroes/ but only for one per player.
This is the version that has a variable.
Grow Red
Events
Unit - A unit owned by Player 1 (Red) Begins casting an ability
Conditions
(Ability being cast) Equal to Blizzard
Actions
Set PlayerRedHero = (Casting unit)
Animation - Change PlayerRedHero's size to (101.00%, 101.00%, 101.00%) of its original size
Wait 2.00 seconds
Animation - Change PlayerRedHero's size to (102.00%, 102.00%, 102.00%) of its original size
Wait 2.00 seconds
Animation - Change PlayerRedHero's size to (103.00%, 103.00%, 103.00%) of its original size
Wait 10.00 seconds
Animation - Change PlayerRedHero's size to (100.00%, 100.00%, 100.00%) of its original size
Now you have to make one of these for each player.
You can like assign the variable to the unit when it's trained aswell and do it with the second and thrid hero aswell, but that is only if you are planning to have more then 1 hero I gues.
The scripts create local variables for the casting unit, and the percentage size.
Then the cycle enlarges the unit five times, increasing the size a bit every time. "call SetUnitScalePercent()" is equivalent of "Animation - set unit size" and it's parameters are:
1. the casting unit, stored in local variable (tempUnit)
2.-4. unit new size (scale), calculated by the formula (100 + 10*A) (FOR cycle runs five times, each time increasing A by 1)
Your version would definitely work, too, but you have to write "Set unit size" and "wait" three times, which just isn't nice .
Animation - Change (Triggering unit)'s size to (real%, real%, real%) of its original size
Wait 1.00 seconds
That's the way I would do it. I also tested it and it works. =)
You don't need a local variable for the unit since triggering unit always refers to the unit actually casting the spell.
Define a normal real variable (in this example called "real") first, then you just need one custom script line declaring the global variable to be local (udg_ is the prefix for global variables).
You can also replace the "from 1 to 5" to "from 1 to (Level of (Ability being cast) for (Triggering unit))" so it grows more depending on the level of the ability for the unit.
Note: If you cast your ability multiple times, the unit's size will always be set to it's original size and be increased again.
Ok, thanks for all the responds (and they are great) but is it also possible to cast a spell, create a dummy unit (like a ball or something) and make that one bigger every second?
Wow, that's kind of ... w000000t? I mean I just changed a few lines, so I didn't test that one too. Let's see ...
[edit] Obviously it's because of defining the local unit variable. I fixed it by using custom script, but don't ask me why this works ... Now you don't need a global unit variable. I also changed the additional size so you can see whether it works.
But I found out that the dummies grow sometimes more, sometimes less. Professional help is needed.
grow
Events
Unit - A unit starts the effect of an ability
Conditions
(Ability being cast) Equal to Your Ability
Actions
Custom script: local real udg_real
Custom script: local unit u
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Preset for building adjustment degrees
Custom script: set u = GetLastCreatedUnit()
Set real = 100.00
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Set real = (real + 10.00)
Custom script: call SetUnitScalePercent( u, udg_real, udg_real, udg_real )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.