rafaxik
New Member
- Reaction score
- 2
Hi there... I was trying to create a spell that summons a Wisp to drain life and mana from enemies around him whenever his enemies stays in his range. Then it give all life and mana obtained and give it to the hero that summoned it in life and mana, respectively.
It's just like a wisp to cast multiple siphon mana (and life) in creatures. If a creature get into the range, it also gets caught by wisp's spells...
Level 1 - Drains 10 life and 12 mana per second each unit, transfers 50 % of total drained;
Level 2 - Drains 15 life and 18 mana per second each unit, transfers 60 % of total drained;
Level 2 - Drains 20 life and 26 mana per second each unit, transfers 70 % of total drained.
I tried it with a bunch of stuff and it didn't work...
I doubt it can be useful, but I tried some triggers (ps: I don't understand well ahshtables, but I tried =/):
Trigger 1
Trigger 2
Trigger 3
I've tried, with this trigger, to suck only mana, just to see if it works... And Divine shield it's just to create a visual effect, but I know that it could also be triggered by
.
If someone can help me, I appreciate that.
Thx
EDIT 01: I Forgot to say that, the created wisp dummy is called dummy02 with wisp model and dummy01 is just another dummy with no model
EDIT 02: Map too big =/
It's just like a wisp to cast multiple siphon mana (and life) in creatures. If a creature get into the range, it also gets caught by wisp's spells...
Level 1 - Drains 10 life and 12 mana per second each unit, transfers 50 % of total drained;
Level 2 - Drains 15 life and 18 mana per second each unit, transfers 60 % of total drained;
Level 2 - Drains 20 life and 26 mana per second each unit, transfers 70 % of total drained.
I tried it with a bunch of stuff and it didn't work...
I doubt it can be useful, but I tried some triggers (ps: I don't understand well ahshtables, but I tried =/):
Trigger 1
Trigger:
- HashTable
- Events
- Map initialization
- Conditions
- Actions
- Hashtable - Create a hashtable
- Set H = (Last created hashtable)
- Events
Trigger:
- Spirit Wisp Variables
- Events
- Unit - A unit Spawns a summoned unit
- Conditions
- ((Summoned unit) has buff Spirit Wisp ) Equal to (==) True
- Actions
- Trigger - Turn off (This trigger)
- Set SW_Unit_Summoned = (Summoned unit)
- Set SW_Unit_Caster = (Summoning unit)
- Set SW_Level_of_Ability = (Level of Spirit Wisp for SW_Unit_Caster)
- Set SW_Point_Target = (Position of SW_Unit_Summoned)
- Set SW_Player_Owner_of_Caster = (Owner of (Summoning unit))
- Unit Group - Pick every unit in (Units within (135.00 x (Real(SW_Level_of_Ability))) of SW_Point_Target matching (((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) belongs to an enemy of SW_Player_Owner_of_Caster) Equal to (==) True) and (((Matching unit) is al and do (Actions)
- Loop - Actions
- Set SW_Units_Around_the_Wisp = (Last created unit group)
- Set SW_Unit_Picked_in_Group = (Picked unit)
- Unit - Create (Number of units in SW_Units_Around_the_Wisp) dummy02 for SW_Player_Owner_of_Caster at SW_Point_Target facing Default building facing (270.0) degrees
- Set SW_Unit_Last_Created = (Last created unit)
- Unit - Add Siphon Mana (For the dummy) to SW_Unit_Last_Created
- Unit - Set level of Siphon Mana (For the dummy) for SW_Unit_Last_Created to SW_Level_of_Ability
- Unit - Add Divine Shield Effect to SW_Unit_Last_Created
- Unit - Set level of Divine Shield Effect for SW_Unit_Last_Created to SW_Level_of_Ability
- Set SW_Initial_Mana_Dummy = (Mana of SW_Unit_Last_Created)
- Hashtable - Save SW_Initial_Mana_Dummy as 0 of (Integer((Max mana of SW_Unit_Picked_in_Group))) in H
- Hashtable - Save SW_Inital_Mana_Caster as (Integer((Mana of SW_Unit_Caster))) of (Integer((Max life of SW_Unit_Caster))) in H
- Unit - Order SW_Unit_Last_Created to Human Paladin - Activate Divine Shield
- Unit - Order SW_Unit_Last_Created to Human Blood Mage - Siphon Mana SW_Unit_Picked_in_Group
- Trigger - Turn on Spirit Wisp Loop <gen>
- Loop - Actions
- Custom script: call DestroyGroup (udg_SW_Units_Around_the_Wisp)
- Custom script: call RemoveLocation(udg_SW_Point_Target)
- Trigger - Run Spirit Wisp Loop <gen> (checking conditions)
- Trigger - Turn on (This trigger)
- Events
Trigger:
- Spirit Wisp Loop
- Events
- Unit - A unit Begins channeling an ability
- Conditions
- (Ability being cast) Equal to (==) Siphon Mana (For the dummy)
- Actions
- Set SW_Unit_Finishing_Channelling = (Casting unit)
- Set SW_Final_Mana_Dummy = (Mana of SW_Unit_Last_Created)
- Unit - Set mana of SW_Unit_Caster to ((Load (Integer(SW_Inital_Mana_Caster)) of (Integer((Max mana of SW_Unit_Picked_in_Group))) from H) + (Mana of SW_Unit_Finishing_Channelling))
- Unit - Add a 0.01 second Generic expiration timer to SW_Unit_Last_Created
- Events
Trigger:
- Special Effect - Create special effect on target unit using my model
If someone can help me, I appreciate that.
Thx
EDIT 01: I Forgot to say that, the created wisp dummy is called dummy02 with wisp model and dummy01 is just another dummy with no model
EDIT 02: Map too big =/