• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Trigger Unit to Cast Custom ability?

Status
Not open for further replies.
Level 2
Joined
Aug 21, 2010
Messages
6
Hi, I've been working on a map and I am having troubles with making a unit cast a custom ability. I want it to cast a custom spell, but it only gives me preset ones from other heroes. I've read the tutorial and i heard i must use order string of some sorts, but im not sure where to find it. I basically Unit-> Issue Order targeting a point and made it say Order-> [Last Created Unit] to Human Archmage-Blizzard to [ Target Point of ability being cast].

However, I want to change the Human Archmage Blizzard to my own custom spell. But when i click on it, it only gives me presets.

Can anyone tell me how to fix this?
 
Go to your custom ability and find the "Text - Order String - Turn on/Use" field.
Then, since it's a Target point ability, use:
  • Set Point1 = (Target point of ability being cast)
  • Unit - Create 1 Dummy for (Triggering player) at Point1 facing Default building degrees
  • Unit - Add Blizzard (dummy) to (Last created unit)
  • Unit - Set level of Blizzard (dummy) for (Last created unit) to (Level of (Ability being cast))
  • Custom script: call IssuePointOrderLoc (GetLastCreatedUnit(), "blizzard", udg_Point1)
  • Custom script: call RemoveLocation (udg_Point1)
Replace "blizzard" with your spell's "orderstring" (make sure the orderstring is placed within quotes).
 
Status
Not open for further replies.
Top