JASS:
function Abilitys_Func takes nothing returns nothing
if GetLearnedSkill() == 'A03W' then
call GroupAddUnitSimple(GetLearningUnit(), udg_LightningStormGroup)
else
call DisplayTextToForce(GetPlayersAll(), "Not A Recognized Ability")
endif
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_005 takes nothing returns nothing
set Abilitys = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(Abilitys, EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(Abilitys, function Abilitys_Func)
endfunction
globals
trigger Abilitys
endglobals
I use this to init my ability learn trigger and when i learn 'A03W' it doesnt say Not a Recognized ability so that should be all good.
-
Lightning Periodic
-
Events
- Time - Every 6.00 seconds of game time
- Conditions
-
Actions
- Custom script: set bj_wantDestroyGroup = true
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in LightningStormGroup) Not equal to 0
-
Then - Actions
-
Unit Group - Pick every unit in LightningStormGroup and do (Actions)
-
Loop - Actions
- Set TempUnit = (Picked unit)
- Set TempLoc = (Position of TempUnit)
- Set TempUnitGroup2 = (Units within (525.00 + (75.00 x (Real((Level of Mind of the Storm T1 ELEM for TempUnit))))) of TempLoc matching (((Owner of TempUnit) Equal to Neutral Hostile) or ((Owner of TempUnit) Equal to Player 12 (Brown))))
- Custom script: call RemoveLocation(udg_TempLoc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempUnitGroup2) Not equal to 0
-
Then - Actions
-
Unit Group - Pick every unit in TempUnitGroup2 and do (Actions)
-
Loop - Actions
- Game - Display to (All players) for 30.00 seconds the text: Successful?
- Set TempLoc = (Position of (Picked unit))
- Special Effect - Create a special effect at TempLoc using war3mapImported\Great Lightning.mdx
- Special Effect - Destroy (Last created special effect)
- Unit - Cause TempUnit to damage (Picked unit), dealing (((Real((Intelligence of TempUnit (Include bonuses)))) x (2.00 + (Real((Level of Mind of the Storm T1 ELEM for (Picked unit)))))) + 0.00) damage of attack type Spells and damage type Normal
- Custom script: call RemoveLocation(udg_TempLoc)
- Game - Display to (All players) for 30.00 seconds the text: Successful!
-
Loop - Actions
-
Unit Group - Pick every unit in TempUnitGroup2 and do (Actions)
-
Else - Actions
- Game - Display to (All players) for 30.00 seconds the text: No Targets!
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in LightningStormGroup and do (Actions)
-
Else - Actions
- Game - Display to (All players) for 30.00 seconds the text: No Heroes!
-
If - Conditions
-
Events