• 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.

[Trigger] Locust Swarm Return Mana?

Status
Not open for further replies.
Level 23
Joined
Nov 29, 2006
Messages
2,482
That seems like a complicated issue. The spell itself would be best alone made purely as jass (like self-controlling where the locusts should attack and such) and then fix the mana returned (but yes, its maybe too complicated)

In GUI and by using the current locust swarm ability its limited, as you cant check when a locust isnt even returning the life. The closest (yet inaccurate) way to do this would to check when the locust units is within a small certain range of the caster. But then, it would also give mana when the locust is just flying above.

Isnt the soul harvest ability more like a no-target spell where you 'stomp/clap' the ground so that the enemies souls are drained out of their body returning mana?
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
aaah well lol :) I do have an alternative in mind :p

If its going to be that hard, I may just create a locust swarm dummy effect, and make the casters mana increase a set amount every second if there are enemy units nearby.

I imagine that will be a lot easier :D

However, that brings me onto another question, how do you get a trigger to detect units within a radius of the caster, that belong to a specific player? :S
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Yeah, but it wouldnt be too accurate as well. They will still fly over an enemy.

Speaking of that, the dummy unit is a good idea. You could make the dummy locust caster have, let say 100 hp, and then check with a periodic timer and see if the dummy caster received more health. Simple math here you know;) and then it would be easy to give the life gained as mana to the real caster.
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
Yeah, but it wouldnt be too accurate as well. They will still fly over an enemy.

Speaking of that, the dummy unit is a good idea. You could make the dummy locust caster have, let say 100 hp, and then check with a periodic timer and see if the dummy caster received more health. Simple math here you know;) and then it would be easy to give the life gained as mana to the real caster.

wow :O thats awesome

So basically, I need to make a trigger that says:

"every time the dummy unit receives health, increase the mana of the caster by the same amount" :D

Ty for the help :D +rep!



And I kn ow its not very accurate, but If the caster could zap mana out of units killing them instantly, it would be kinda imba :S
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
No problem..

It may not be as simple as finding an event like that, but yes, a periodic timer would do it.

Do I have to get into details? Im just gonna give you some just in case.
At every timer expiration check, set 'subtratedLife' as 'current hp of the dummy caster' - 'last hp', and give the caster the equal amount of 'subtractedLife' as mana.
Then, set the 'lasthp' tp 'current hp of dummy caster' at the end of the trigger.
I suggest arrays for making it mpi, I have no good solution of making it mui. But mpi would be enough in your map.
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
No problem..

It may not be as simple as finding an event like that, but yes, a periodic timer would do it.

Do I have to get into details? Im just gonna give you some just in case.
At every timer expiration check, set 'subtratedLife' as 'current hp of the dummy caster' - 'last hp', and give the caster the equal amount of 'subtractedLife' as mana.
Then, set the 'lasthp' tp 'current hp of dummy caster' at the end of the trigger.
I suggest arrays for making it mpi, I have no good solution of making it mui. But mpi would be enough in your map.

good point with the arrays :D I hadnt thought about that :)
 
Status
Not open for further replies.
Top