Help with spell

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:
  • HashTable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set H = (Last created hashtable)
Trigger 2
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>
      • 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)
Trigger 3
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
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
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 =/
 

NeuroToxin

New Member
Reaction score
46
if you want, I could probably do this without hashtables, i dont understand hashtables well either

if not, what doesnt work? if it doesnt work period, then its the condition

Heres what you can do, do this, A unit starts the effect of an ability, ability being cast == to (ability) and then do last summoned unit, I think theres an option for that, if not that then last created unit
if you want me to do it without hashtables, attach the map
 

rafaxik

New Member
Reaction score
2
Just gonna post here quick, read my above post, edited it

Map Size is too big for the forum =/
it exceeds 3 mb...

For your question, there are leaks I can't see where, maybe I put in the wrong position, Idk.
I cast the spell, and it channels a few siphon mana, doesn't work for all enemies around the wisp. And it works, at most, twice...
It removes all mana points from my caster and don't give any of mana/hp drained from the targets to him.
 

NeuroToxin

New Member
Reaction score
46
alright, give me till tomorrow at 4 pm (Eastern Time) and ill have it done, no worries, sorry for the wait, but I have school, and sleep now :p, ill get right to it tomorrow
 

rafaxik

New Member
Reaction score
2
haha I've got to sleep too =/
See(read) you tomorrow :D

Thx

Edit: So... any ideas? anyone?
 

NeuroToxin

New Member
Reaction score
46
Ok, Its working, BUT the unit isnt moving yet, and IDK why, I posted for help, but i dont really see a problem with it
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top