Outbreak191
New Member
- Reaction score
- 17
This trigger used to work but it just suddenly stopped. I have recreated it infinite times and it seems to defy all logic by not working no matter what. Its meant to make a unit forget an ability if he drops the item providing it before the ability is level 11 but currently he keeps the ability no matter what. The variables are controlled with an array each and items providing the ability will have the same number as the ability it provides. Here is the trigger:
Don't comment on the whole cheap JASS thing, when I get this to work I'm gonna convert it to jass to make it properly MUI.
Code:
Unlearn Item Ability 2 Copy
Events
Unit - A unit Loses an item
Conditions
Actions
Custom script: local unit udg_hero
Custom script: local item udg_drop
Set hero = (Hero manipulating item)
Set drop = (Item being manipulated)
Wait 0.50 seconds
For each (Integer B) from 1 to 13, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ability_Item[(Integer B)] Equal to (Item-type of drop)
Then - Actions
For each (Integer A) from (((Player number of (Owner of hero)) x 8) + 1) to (((Player number of (Owner of hero)) x 8) + 6), do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hero_Learning_Ability[(Integer A)] Equal to Class_Ability[(Integer B)]
Then - Actions
Set Ability_Enabled[(Integer A)] = False
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Class_Ability[(Integer B)] for hero) Less than or equal to 10
Then - Actions
Player - Disable Class_Ability[(Integer B)] for (Owner of hero)
Else - Actions
Else - Actions
Custom script: set udg_hero = null
Custom script: set udg_drop = null
Don't comment on the whole cheap JASS thing, when I get this to work I'm gonna convert it to jass to make it properly MUI.