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

Barrage Spell

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hello,i tryed to add manacost for each shot on the barrage spell,but it doesn't work,is there any way to fix it/add manacost for each hit made with barrage spell?

u can decrease the mana with trigger, simple when unit attack tnd attacker got barrage then decrease his mana (or more accurated way is with damage detection system but there also u can do same, simple if DamageEventSource barrage level > 0 then decrease ability lv*100 mana endif)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
If you work with damage detection system, -Kobas- thing will happen. If you use "a unit is attacked" it can also happen, since the attack begins a bit before the "real" attack.

Also, you would have to detect your mana before attacking, since you could attack using 0 mana and triggers couldn't reduce it more than that.

On attack you could create 1 dummy unit on your position and order to attack one of the units around (depending on your barrage target limit) and prevent other dummies to attack the same target. Before creating each dummy you can check your mana, and if it's not enough, stop the "dummy creation process".
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Honestly, I don't know why I said that. It meant something then, now I can't figure it out.

How to check available mana before attacking to adjust available shoots accordingly?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
But what, a constant loop that checks the amount of units available to be attacked with barrage, check the mana availble for the attack, and remove the ability if it doesn't meet the requirement?

It should consume x amount of mana per target. If you have 10 targets, and enough mana just for 2 shots, it should shoot 2 targets, but not remove barrage completely, and whithout having to use a loop to constantly check...
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
But what, a constant loop that checks the amount of units available to be attacked with barrage, check the mana availble for the attack, and remove the ability if it doesn't meet the requirement?

It should consume x amount of mana per target. If you have 10 targets, and enough mana just for 2 shots, it should shoot 2 targets, but not remove barrage completely, and whithout having to use a loop to constantly check...

but u can make more level to barrage so can make each level +1 target :p
anyway for complex system the projectile systems better then
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Uhum... but then, he would have to constantly check the number of targets around and constantly check if the mana is enough for all of them, and if it isnt, then set Barrage level accordingly... I like the Projectile system over this :p
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Uhum... but then, he would have to constantly check the number of targets around and constantly check if the mana is enough for all of them, and if it isnt, then set Barrage level accordingly... I like the Projectile system over this :p

y, there advantage, i working on projectile system too (just homing missile combined with parabola kinda too hard to me, another problem is the arrow faceing but else its work)
 
Status
Not open for further replies.
Top