HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multi-Shot (Instuctions & Map Download)

02-03-2004, 05:12 PM#1
AllPainful
Due to the number of people I see asking how to create a multi-shot spell, and the fact that I am weary of C&Ping the same message all the time about it. I figured it should be added to the Repository.


Base Multishot on Barrage.

Here. My attachment has a hero ability that has 3 levels and a Unit ability (also With 3 levels) and a building with the unit multishot upgrade in it.


About the Hero Version:
Level 1 - 3 Targets
Level 2 - 4 Targets
Level 3 - 5 Targets

In the attached map the hero is level 10 with no skill points spent, and is surounded by enemies, none of the enemies have attacks or special abilities, and they don't flee so they will just stand there while you shoot.

The hero has Searing arrows, Black arrows and Frost arrows and the multishot ability, and the only one that doesn't work with Multishot is Frost arrows.

Searing arrows and Black arrows will still only target 1 unit, but other "Multishot" projectiles will still be launched. This does NOT make Searing arrows or Black arrows target more than 1 unit.

NOTE: There is a flaw/conflict between barrage & Searing/Black arrows, if they are learned in the wrong order (or if a unit starts with both of them already availiable) then the Searing/Black arrows will NOT autocast.

About the Unit version:
Level 1 - 3 Targets
Level 2 - 4 Targets
Level 3 - 5 Targets

In the attached map the archer has the level 1 Multishot, the building north of the archer has the upgrades to upgrade the archers multi-shot.

Heres how the spell works:

1. The spell does the regular units damage plus whatever bonus damage is set in the spell to ALL targets (In this case 1 extra damage, setting bonus damage to zero causes problems so don't do it)

2. The Projectile art field can have multiple entries. In this version there are 3 different arts... You will notice this when the hero attacks. It randomly chooses one of the 3 projectile arts for each projectile fired.
NOTE: The number of "Arts" you have effects the number of targets!! SEE Target Math!!!!!
NOTE2: The projectile art field OVERRULES the projectile art of the unit that has the ability, even when only firing 1 shot.
NOTE3: You CAN (and may want to, see Target Math) have more than one of the same projectile art listed.


3. Maximum number of targets field.
NOTE:Sounds obvious, but doesn't work the way you would think! SEE Target Math!!!!!
WARNING! SETTING THIS FIELD TO 0 WILL MAKE THE UNIT ABLE TO TARGET EVERY UNIT IN RANGE! No matter how many thier are!

4. Area of Effect = Range of the Multishots attack.
NOTE: This effects the units range EVEN if unit is only targeting 1 thing.

5. Max damage set to 0 (Which means unlimited) if its set to anything else it too can cuase problems because hero units damage changes as it levels up... So if you set this to say 100 and the hero does 75 damage a shot, then even if you have multishot set to shoot 4 shots, due to the damage limit the hero would only shoot 2 shots.


If you want to use the spell, the easiest way would be to copy and past (open your map you want it in, and this map, and open the object editor, highlight the ability you want and hit copy, then click "Window" and click on your map and paste the ability. DO NOT EXPORT EVERYTHING AND IMPORT INTO YOUR MAP! I MODIFIED 4 UNITS)

If you use it, I don't ask for credit for it, but I do ask that you don't claim you made it. It doesn't bother me not to get credit for something but it DOES bother me when someone claims credit for something they didn't do.

Target Math NOTE: Minimum targets is 3

The number of "Art - Projectile Art" entries in the object editor effects the number of targets. The minimum number of "Art - Projectile Art" entries you should use is 1. But for each additional "Art - Projectile Art" entry 1 extra target is allowed. So 3 arts in the "Art - Projectile Art" field = 2 extra attacks.

You must also consider the "Maximum Targets Allowed" field. It effects the number of target EXCLUDING the extra attacks granted by the "Art - Projectile Art".

So the formula for figuring number of targets is:
(# of projectile arts in field)-1+(# in maximum number of targets field)

So using the above formula, the follow is how the number of targets in my example map is figured:

Code:
Level 1 = 3 Arts = 2 extra attacks 
                 + 1 Maximum number of targets
                 = 3 Targets
Level 2 = 3 Arts = 2 extra attacks 
                 + 2 Maximum number of targets
                 = 4 Targets
Level 3 = 3 Arts = 2 extra attacks 
                 + 3 Maximum number of targets
                 = 5 Targets


In other words, think as the number of Arts as the BASE amount of attacks, and the set the maximum number of targets to adjust it for additional levels.


ON ANOTHER NOTE: this spell might be considered "Too Common". The reason is because I have put this EXACT reply to MANY boards asking about a multishot ability... So there might be alot of maps with this ability (although I have not come across one that I played that had it yet...)
02-03-2004, 08:02 PM#2
311
havent downloaded it yet but did you get mana cost to work with it? I never could, I got everything to work fine excecpt that.
02-03-2004, 09:19 PM#3
AllPainful
Nope. Its a passive ability, can't get a passive ability to use mana.
07-21-2004, 11:59 PM#4
MattPaintballer
You could use a trigger to do that. Something like this: Say all Marines have the ability multishot, and you want multishot to cost 10 mana, and all marines have 100 mana.

Multishot Mana Cost
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Triggering unit)) Equal to Marine
Actions
Unit - Set mana of (Triggering unit) to (100.00 - 10.00)
07-22-2004, 04:06 AM#5
AllPainful
Quote:
Originally Posted by MattPaintballer
You could use a trigger to do that. Something like this: Say all Marines have the ability multishot, and you want multishot to cost 10 mana, and all marines have 100 mana.

Multishot Mana Cost
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Triggering unit)) Equal to Marine
Actions
Unit - Set mana of (Triggering unit) to (100.00 - 10.00)
Not true.

1. You would want "Attacking Unit" not "triggering unit" Because triggering unit is the unit BEING attacked.
2. That would not stop the marine from using multishot if he had no mana.
3. You would use "Integer (unit stat(attackingunit(current mana)))" not 100.00



Yes Via triggers you could Simulate a mana cost. But it would take more than one trigger because you would have to disable it when a unit that has it mana drops below 10, and then re-enable it if the mana goes back above 10.
07-22-2004, 07:22 PM#6
Xinlitik
Ok here's my two cents...

The "a unit is attacked" event fires the moment the unit starts to swing, which means that if you did an if mana > 10 or whatnot then disable Multishot else subtract mana. I'm 90% sure that you doing this would catch the multishot before it could work; however, you can only disable abilities for the player, so all the other marines wont be able to use it...
07-23-2004, 04:40 AM#7
AllPainful
Quote:
Originally Posted by Xinlitik
Ok here's my two cents...

The "a unit is attacked" event fires the moment the unit starts to swing, which means that if you did an if mana > 10 or whatnot then disable Multishot else subtract mana. I'm 90% sure that you doing this would catch the multishot before it could work; however, you can only disable abilities for the player, so all the other marines wont be able to use it...

Not entirely true.

It is fully possible to remove abilities from a particular unit via triggers, as well as give the ability to a unit. It takes 3 triggers to make it all run smoothly. And it is completely possible.

I know HOW to do it, I've done it.

The problem is "unit is attacked" event is not a prefered event to use in a map (gee... event only triggers about a billion times in a map.... talk about a lag maker...) but there are ways to make it SIMULATE a non-passive ability as well. If you don't mind working with and if you know triggering (especially JASS) its all doable. And if you don't mind having like 5-7 triggers to do it you could also manage to do it without a "Unit is Attacked" event.
07-23-2004, 06:01 AM#8
Xinlitik
Hey, you're right. I didnt use extra events or anything but I got it to work for the most part. It can be tricked (right as you're attacking, move away and youll lose mana but retain the ability...), but other than that it works well.

Here's the map...
07-25-2004, 08:16 PM#9
BinWolf
Theres a way to do it...

Changed Searing Arrows to Multi-Shot with 0 dmg, 10 mana per cost.

Trigger
E:Unit begins casting ability

C:Ability being casted equal to Searing Arrows

A:Give (casting unit) the Multi-Shot(Barrage ability. Change it to have no tooltips and a black icon to blend in)
Set MultiShotUnit(Owner of Casting Unit) = Casting Unit

Trigger 2
E:Unit is attacked

C:Attacking Unit Equal to MultiShotUnit(Owner of Attacking Unit)

A:Remove Multi-Shot ability from MultiShotUnit(Owner of Attacking Unit)

If it doesn't work, try this second trigger.

Trigger 2
E:Unit is attacked

C:Attacking Unit Equal to MultiShotUnit(Owner of Attacking Unit)

A: Wait 0.50 seconds
Remove Multi-Shot ability from MultiShotUnit(Owner of Attacking Unit)
07-25-2004, 09:49 PM#10
AllPainful
Quote:
Originally Posted by BinWolf
Theres a way to do it...

Changed Searing Arrows to Multi-Shot with 0 dmg, 10 mana per cost.

Trigger
E:Unit begins casting ability

C:Ability being casted equal to Searing Arrows

A:Give (casting unit) the Multi-Shot(Barrage ability. Change it to have no tooltips and a black icon to blend in)
Set MultiShotUnit(Owner of Casting Unit) = Casting Unit

Trigger 2
E:Unit is attacked

C:Attacking Unit Equal to MultiShotUnit(Owner of Attacking Unit)

A:Remove Multi-Shot ability from MultiShotUnit(Owner of Attacking Unit)

If it doesn't work, try this second trigger.

Trigger 2
E:Unit is attacked

C:Attacking Unit Equal to MultiShotUnit(Owner of Attacking Unit)

A: Wait 0.50 seconds
Remove Multi-Shot ability from MultiShotUnit(Owner of Attacking Unit)


There are LOTS of way of accoplishing the simulation of mana usage.
07-25-2004, 11:23 PM#11
Xinlitik
Use the one I did...it's nearly flawless and only takes 1 trigger.