• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Mana Transfer between allies

Status
Not open for further replies.
Level 9
Joined
Aug 7, 2009
Messages
380
As usual: hello
I'm asking for help to give me a advise trigger that make a spell which make the target unit (allied) transfer its mana to the caster. This spell is for buildings so you don't need to conculate the range when it is too far and stop the transfer. And.. 1 more thing, if possible, you can make it to be able to cast multi target (that means all targeted unit transfer its mana to the caster per second) thanks
 
something like this can do that...
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set MANA = (Mana of (Target unit of ability being cast))
      • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + MANA)
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) - MANA)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I have made such a system a long time (a year and a half now I think).
The system is based on an old map called "Power Towers" (which uses mana as a sort of electricity, so you can create entire networks of it).

I'll attach the system to this post.
Unfortunately, back then I wasn't really interested in making systems understandable/easy to edit and I abused arrays.

Still, it works as it should (with a maximum of 4 transfers at a time, I can change that if you want).
If you want to undo a transfer, just use the ability on the building again.
 

Attachments

  • Mana Transfer Demo2.w3x
    16.3 KB · Views: 84
Level 9
Joined
Aug 7, 2009
Messages
380
@ mckill2009: that just like steal the mana from the target instant not transfer that means every x second the target give x mana to the caster
@ Nixii: good suggestion i would use it if ap0calypse does not come :)
@ ap0calypse: yep, that's what i want and it performs pretty well as i see, and my idea also came from the "Power Towers" map but use it in my own map :)
Result: +rep all for your spent time and trying
 
Level 9
Joined
Aug 7, 2009
Messages
380
Oh, ap0calypse, while testing your system, i found that when the target is dead, the lightning effect still there... how to remove the lightning effect? i'll try to figure it out now when waiting for your answer
Edit: And i also found that i don't know such a thing about hashtable..
Edit 2: and also need to detect if the unit has mana or not
Edit 3: well, not just lightning effect still there, but the transfer also doesn't stop
 
Level 9
Joined
Aug 7, 2009
Messages
380
Still need help so pump! it seems like i was triple posting?..
Edit: Here's the Power Towers map (where ideas are from) and it seems to be unprotected, but the system is written in Jass so i have no idea how to copy this stuff, in about 3 hours of reading the system and reading error reported from JassHelper ... but no result is well
I had install the cJass as the map marker told to with his documentation but no result as i said
Hope there's a useful help
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Oh, ap0calypse, while testing your system, i found that when the target is dead, the lightning effect still there... how to remove the lightning effect? i'll try to figure it out now when waiting for your answer
Edit: And i also found that i don't know such a thing about hashtable..
Edit 2: and also need to detect if the unit has mana or not
Edit 3: well, not just lightning effect still there, but the transfer also doesn't stop
Excuse me, I did indeed not notice this message.

I edited the system so it now removes the lightning effect when a unit (either the source or the targeted building) dies.
In my map they couldn't die, so I simply did not add it ^^

1) You do not know what about hashtables?

2) It already detects whether the unit has mana or not? The lightning effect changes if the source is out of mana, it also changes when the targeted building already has maximum mana.
If the source is out of mana, then he will give the rest of his mana to the building (due to mana regeneration, or man transfer from other sources).

3) Indeed, fixed that :D

I also removed the arrays, polished it up a little and you should check out the first trigger ("Power | Map Init") if you want to change something.
 

Attachments

  • Mana Transfer Demo3.w3x
    17.9 KB · Views: 82
Status
Not open for further replies.
Top