HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding spell to unit

08-04-2006, 04:57 PM#1
Fallenzeca
I know how to add an ability to a unit, the title may be a little misleading but couldnt find a better one =P.
I want to add a new ability to a hero. The hero should have more buttons(like the ability button) that they can click on and in it should be the new abilities that has been added.´

1 more thing. Is there a way to make only 1 trigger that will create a floating text above a casting unit that says the name of the spell being casted or do I have to make a new one for every spell??


All help appreaciated.
08-04-2006, 05:12 PM#2
Alevice
Quote:
Originally Posted by Fallenzeca
I know how to add an ability to a unit, the title may be a little misleading but couldnt find a better one =P.
I want to add a new ability to a hero. The hero should have more buttons(like the ability button) that they can click on and in it should be the new abilities that has been added.´

http://www.wc3campaigns.net/showthread.php?t=85991
08-04-2006, 05:15 PM#3
The)TideHunter(
Use Spellbooks for a effect like the normal red cross where it has more abilities.
And yes you can create a floating text which reads the ability being cast, like this:
It uses a small portion of Jass though, to get the spell name

Trigger:
Show Text
Collapse Events
Unit - A unit Starts the effect of an ability
Conditions
Collapse Actions
Custom script: set udg_TempString = GetObjectName(GetSpellAbilityId())
Set TempPoint = (Position of (Casting unit))
Floating Text - Create floating text that reads TempString at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
Custom script: call RemoveLocation(udg_TempPoint)
08-04-2006, 05:41 PM#4
Fallenzeca
yay, thx alot guys =) So happy i works xD
08-04-2006, 07:35 PM#5
StockBreak
Well, what about adding that ability to the hero from the beginning in the WE but disabling (Player-Enable/Disable Ability) it until needed? I hope it helps.