TzalDadok
New Member
- Reaction score
- 2
I made this function trying to copy the Soul Ring from DotA, but when I click to use the item nothing happens.
Trigger:
- Soul Ring FUNC 1
- Events
- Unit - A unit Uses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Soul Ring
- Actions
- Set ITEM_SoulRing_Caster = (Triggering unit)
- Unit - Set life of ITEM_SoulRing_Caster to ((Life of (Triggering unit)) - 150.00)
- Unit - Set mana of ITEM_SoulRing_Caster to ((Mana of (Triggering unit)) + 150.00)
- Set ITEM_SoulRing_InitialMana = (Mana of ITEM_SoulRing_Caster)
- Countdown Timer - Start ITEM_SoulRing_Timer as a One-shot timer that will expire in 10.00 seconds
- Set ITEM_SoulRing_Activate = True
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ITEM_SoulRing_StartEffectEvent Equal to False
- Then - Actions
- Trigger - Add to Soul Ring FUNC 2 <gen> the event (Unit - ITEM_SoulRing_Caster Starts the effect of an ability)
- Set ITEM_SoulRing_StartEffectEvent = True
- Else - Actions
- Do nothing
- If - Conditions
- Events
Trigger:
- Soul Ring FUNC 2
- Events
- Conditions
- ITEM_SoulRing_Activate Equal to True
- Actions
- Set ITEM_SoulRing_FinalMana = (ITEM_SoulRing_InitialMana - (Mana of ITEM_SoulRing_Caster))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ITEM_SoulRing_FinalMana Greater than 150.00
- Then - Actions
- Set ITEM_SoulRing_Activate = False
- Else - Actions
- Do nothing
- If - Conditions
Trigger:
- Soul Ring FUNC 3
- Events
- Time - ITEM_SoulRing_Timer expires
- Conditions
- ITEM_SoulRing_Activate Equal to True
- Actions
- Unit - Set mana of ITEM_SoulRing_Caster to ((Mana of (Triggering unit)) - ITEM_SoulRing_FinalMana)
- Events