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

For every unit do xxx damage

Status
Not open for further replies.

ApM

ApM

Level 2
Joined
Nov 13, 2004
Messages
19
I am doing a spell called Soul Beam, and the problem i am having is that i wont my spell to do for ever unit do xxx damage so if there are 4 units in the targeted area i wont it to do 50 damage for each unit so that wud be 200 damage and if there was 6 untis it wud do 300 damage and so on but ic arnt seem to get it to work. can any one help me?! please :?: :?:
 
Level 11
Joined
Aug 15, 2004
Messages
710
ApM said:
I am doing a spell called Soul Beam, and the problem i am having is that i wont my spell to do for ever unit do xxx damage so if there are 4 units in the targeted area i wont it to do 50 damage for each unit so that wud be 200 damage and if there was 6 untis it wud do 300 damage and so on but ic arnt seem to get it to work. can any one help me?! please :?: :?:
is it triggered, or a normal spell? what is it based off, what triggers did u use? post them here.
 
Level 7
Joined
May 16, 2004
Messages
355
It would need to be triggered, okay this is somewhat simple, make a "count units in range of position of castign unit" and assign it as a variable right apon casting, then do a "damage target for *arithmetic* var(unit#) x 50" that should give you the desired results, enjoy
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Let me get it... So you want to say that the more units there are, the more AoE damage it does? Umm... I think I got it. So if you have 6 units in the AoE, it makes 50*6 damage to EACH unit or just 50 damage/unit? If you want the first one... Just get in a variable the (Number of Units in area (Target Point of Ability being Cast offset by YourAreaOfEffect) Matching (Matching Unit belongs to an enemy of (Casting Unit)) and then you do 50*variable damage to each unit through the (Pick Up Every Unit). If you want fixed damage, you just do 50 damage to each unit through (Pick Up Every Unit). Got it now?

~Daelin
 

ApM

ApM

Level 2
Joined
Nov 13, 2004
Messages
19
Erm......cud u put it in a trigger for me cus that makes no sence at all...
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
img.jpg


And now to explain... I didn't really get what you wanted. You wanted to do 50*(number of units in the AoE) damage/unit or just 50 damage/unit? If you wanted only 50 damage/unit don't use the integer variable var and at the damage action just make the unit to 50 damage. If not, use the var. And change the 800 AoE to whatever you want.

And instead of Cluster Rockets, use your custom spell. Base it perhaps on Cluster Rockets and make it do no damage and with no custom animations.

Oh, and instead of the footman, use a dummy unit. That is all you need! Any questions, post here.

~Daelin
 

ApM

ApM

Level 2
Joined
Nov 13, 2004
Messages
19
But yet again u confuse me god, if u cud put it in a trigger or do a little map for me.
u make no sence at all
 

ApM

ApM

Level 2
Joined
Nov 13, 2004
Messages
19
No let me correct my self at the beginning i didnt propily tell u i dont mean like it sed i mean

for ever unit add 50 or what ever amount i wont to a counter , ok

then at the end of the spell it has done all the effects and stuff i wont it to do the counter amount of damage at that point so if there is 5 units and 100 damage it will store 500 damage in a counter (variable) for use at the end of the spell
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Give me your email and I will try to send you the map once I make it. Though I don't understand what's so difficult to simply apply the trigger I screenshoted into your own map. Copy it EXACTLY how it is there and then change the following stuff:

->Instead of Creating 1 Footman you will need to create 1 Dummy Unit (I hope you know what dummy units are)
-> When you "Order (Last Created Unit) to Damage (Picked Unit) for (50*Real(var)))", you can change the 50 to whatever you want (the damage multiplier... In your last example, 100). One more mention, the Real(var) is actually the function "Convert Integer to Real". Damage is Real and the number of units is Integer.
-> var is an INTEGER Global Variable
-> At the Conditions, you will need to change the "(Ability Being Cast) Equal to Cluster Rockets" with your own ability (the one you give to the unit you want to have the ability itself)

Of course that BASIC spellmaking requires BASIC knowledge of triggers. If you still can't work with triggers, you can play with them for a while until you get the whole hang.

~Daelin
 
Level 4
Joined
Nov 3, 2004
Messages
79
I have a idea for you!

Ok mmmh when you make three If\then\else Actions and make it:

If the number of Units in Range of Target Unit = 4 then Set the Life of Units be 25(PICKED before) else do nothing.

If the Number of Units in Range of Target Unit = 6 then Set the Life of Units(PICKED before) be 50 else do nothing.

If the Number of Units in Range of Target Unit = 8
then Set the Life of Units(PICKED before) be 75 else do nothing.
 
Status
Not open for further replies.
Top