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

im asking spell again

Status
Not open for further replies.
Level 3
Joined
Jan 13, 2008
Messages
28
i just ask how can create spell like "unit cast spell" then he goes targetted unit and hits some like "5 times" so fast ? like crazy
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Ok, first you have to make a spell in the Object Editor (F6) under the 'Abilities' tab. Press Ctrl+Shift+N to make a new custom ability. You best base it on a spell that has the most in common with your spell. That means check if the spell got Area of Effect, effects specific units or has a special buff or effect if you use that too. Give it a name and the stats you want it to have.

Once you got your spell done, you have to make a trigger for it. In the trigger you make the Event 'Unit - A unit Begins casting an ability'.
Then you make a Condition '(Ability being cast) Equal to <YOUR SPELL>', where you select the spell you just made from the list. If you want the spell to be able to be cast on specific units, then you add that to your conditions.
Finally, you make the Actions. This includes every effect the spell has that can't be entered in the Abilities tab in the Object Editor.

A sample of such a trigger would be
  • Spell trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
      • (Unit-type of (Target unit of ability being cast)) Equal to (Unit-type of (Summoned unit))
    • Actions
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\Defend\DefendCaster.mdl
Good luck.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
That is pretty easy:
First:
  • Events unit begins casting an ability
  • Condition - Ability Being Cast equal to *yourspell*
  • Actions
    • - Set Slasher = casting unit
    • - Set victim = target unit of ability being cast
Then:
  • Events - Unit starts an effect of an ability
  • Conditions - Ability Being cast equal to *yourspell*
  • Actions
    • Unit - Make Slasher Invulnerable
    • Trigger turn on *trigger3*
    • Wait *spell duration*
    • Trigger turn off *trigger3*
And last:
  • Events - Every *x* seconds of game time
  • Conditions
  • Actions
    • Set Slasher_Point = position of victim
    • Unit - Unit move Slasher to Slasher_Point facing Slasher_Point
    • Unit - Unit issue order - Order Slasher to attack victim
    • Custom script: call RemoveLocation(udg_Slasher_Point)
You could only play his attack animations and add Cause unit to damage unit action if you like.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
Victim and Slasher are just examples you need to make 2 variables and then put them into the trigger. So if you want your trigger to work you need an *caster* variable - unit and an *target unit of ability being cast* variable - unit.
So first make those two variables.
 
Level 3
Joined
Jan 13, 2008
Messages
28
i dont know what variables are "Slasher_Point" + "Position of victim"



call RemoveLocation(udg_Slasher_Point) "err0r"
================================================ "err0r"
call InitTrig_asd3( ) "err0r"
 
Level 3
Joined
Jan 13, 2008
Messages
28
sry for askin so much from variables but i doesnt know variables much

now the spell works cause i created the Slasher_point variable wanna i do credits or what ? for my map
 
Status
Not open for further replies.
Top