- Joined
- Jul 26, 2010
- Messages
- 167
Im trying to make a custom "great avatar" ability. The casting unit has 700 attack range but I want it to change to 200 when it cast great avatar. Any way to do it?
SetUnitAcquireRange( GetEnumUnit(), 200.00 )
Use upgrades.
Copy and paste the human 'Flying Machine Bombs' upgrade and level 1 enables attack 1 and level 2 enables attack 2.
Now go to your unit, give the upgrade to the unit and change attack 2 to your needs.
Now if you cast your spell, you will need a trigger.
Something like this:
Anything BIG should be changed of course.. ^^
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to YOURSPELL
- Actions
- Player - Set the current research level of YOURUPGRADE to 2 for (Triggering player)
- Wait DURATION seconds
- Player - Set the current research level of YOURUPGRADE to 1 for (Triggering player)
You cannot de-level upgrades
Never tried it, but tested and .. damnit..
Well then just use a morph spell, change the unit to another one.. -,-'
could u tell me how?, cuz if I replace the unit with another one and the units is an hero, the stats will be set to lvl 1 and stuff I think...