HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questions

10-28-2007, 11:03 AM#1
zetanno
How can i force an unit to cast a specific ability on a unit or on a point ?
If i want to create a moving effect ,i must use a unit with the specific model ?
10-28-2007, 12:06 PM#2
Pyrogasm
Quote:
Originally Posted by zetanno
How can i force an unit to cast a specific ability on a unit or on a point ?
Order it to use the base ability that you based the spell you want the unit to cast. So if you made a new spell called Frost Stun based off of Storm Bolt, you'd order the unit to "Human Mountain King - Storm Bolt".
Quote:
Originally Posted by zetanno
If i want to create a moving effect ,i must use a unit with the specific model ?
...and move it with a periodic trigger, yes.
10-28-2007, 12:34 PM#3
zetanno
But if i create a new ability base on ...Storm Bolt ,i use a trigger to order that unit to cast that ability on an enemy ,it will cast the original Storm Bolt Spell so I must modify the base spell??
10-28-2007, 04:08 PM#4
TaintedReality
No, you're not actually telling the unit to cast the base ability, you're just issuing an order string. Your ability based off of storm bolt (or whatever) will have that same order string, so...yeah.
10-28-2007, 07:46 PM#5
darkwulfv
You base a spell off of Storm Bolt, you order it to use "Human Mountain King - Storm Bolt" in the trigger editor.

You base a spell off of Fan of Knives, you order it to use "Night Elf Warden - Fan of Knives" in the trigger editor.


That's how it works. If you're using JASS, it's
Collapse JASS:
IssueTargetOrder(your unit, "the order string", the target)
IssueImmediateOrder(your unit, "the order string")
IssuePointOrder(your unit, "the order string", the point's X value, the point's Y value)
Examples, in order, are as follows:
Storm Bolt (Targets a unit)
Fan of Knives (Does not have a target)
Shockwave (Targets the ground)

I hope this helped. If you need more, post what the bases for you spells are (what spell you made it out of)
10-31-2007, 12:54 PM#6
waaaks
u need to have different base abilities, because they would cause some bugs if u have 2 of the same abilities

why not create a dummy unit at ur unit's location, and order that unit to use stormbolt for u?
10-31-2007, 01:04 PM#7
Castlemaster
Here's another way to think about it. When you make an ability based off of storm bolt, the command to cast that ability is stored as a string, not the original spell. Therefore, all spells based off of it can be used for that string.

It is common for new mapmakers to make two custom abilities based off the same ability and put them on the same unit. When this happens, the game will only fire one (the same one every time) because two spells use the same string. It has more to do with the string name than the spell itself.