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

Need help creating skill for an item

Status
Not open for further replies.
Level 3
Joined
Sep 20, 2010
Messages
29
Hello, guys. Have a little problem creating skill for a beer item. It must cast a debuff on a hero using it (based on curse ability, as I understand) and after it it must be removed. This ability must trigger an "unit uses item" event. Is it possible to make it without using triggers? Thanks
 
Level 3
Joined
Sep 20, 2010
Messages
29
Thanks =) And as always, Dummies in my hands work incorrectly xD
  • Set Point = ((Position of (Hero manipulating item)) offset by (2.00, 2.00))
  • Unit - Create 1 Dummy for Neutral-Agressive at Point facing 270 degrees
  • Unit - Order (Last created unit) to Banshee-Curse (Hero manipulating item)
  • Wait 10.00 seconds
  • Unit - Remove (Last created unit) from the game
  • Custom script: call RemoveLocation(udg_Point)
Dummy's spawning, but not casting. Checked not only with custom ability - it doesn't work with default curse too. Dummy is based on banshee and it has a curse skill both in uabi and udaa positions (I mean two different skill options)
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Try changing facing point to 225 degrees, change it's movement type to "fly"; also note that after 10 second wait, that dummy may not be last created unit, because in that 10 second time you can train/summon another unit, which will make that new unit a last created unit. Instead give it an expiration timer (it's Unit - add expiration timer) and 2 seconds should enough.

Make sure that ability your dummy casts costs no mana and does not require any upgrades.
Also, use the custom script immediately after you created the dummy unit.
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Try changing the owner of the dummy to Player 1. The computer players can stop the dummy units from casting.
You should also use Triggering Unit instead of Hero Manipulating Item, because it's faster.
You also leak a point (when using offset). Create another point like this:

  • Set Point1 = (Position of (Hero manipulating item))
  • Set Point2 = (Point1 offset by (2.00, 2.00))
  • Unit - Create 1 Dummy for Neutral-Agressive at Point2 facing 0 degrees
  • Unit - Order (Last created unit) to Banshee-Curse (Triggering unit)
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
  • Custom script: call RemoveLocation(udg_Point1)
  • Custom script: call RemoveLocation(udg_Point2)
As mentioned above, add an expiration timer to the dummy to avoid using waits.
 
Level 3
Joined
Sep 20, 2010
Messages
29
Ok, guys, half of a problem solved. Now it works, but only with default curse spell. I've tried to copepaste default one and use it (100% copy) but it doesn't work with a custom spell. And, yeah, if adding expiration timer after spell casting it doesn't work, so I've placed it before this action
 
Level 3
Joined
Sep 20, 2010
Messages
29
Is animation cast/damage point and cast/backswing point set to 0? If so, have you tried changing the base order id of the order? What if you added a wrong spell?

I've copypasted default curse and renamed it. Nope, I've added correct spell =)

> Is animation cast/damage point and cast/backswing point set to 0

Yep

> If so, have you tried changing the base order id of the order

You mean aord (String order)? I haven't changed it, it still contain 'curse' value
 
Does your dummy have locust?

Also, do not create for neutral hostile since some players are allied to that. Make the targets allowed, Hero, Player Units. Then create the dummy for the owner of triggering unit. A better way is to cache all handles(everything with parentheses in the trigger) and remove leaks.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Remove locust from the dummy, let the dummy have model, so you can see it and select it.

When it should cast Curse, select the dummy and see what it does. Does it even have the ability? Does it cast it, or move, turn, or what does the dummy do?

Sometimes I encountered problems with autocast abilities and other times that even though I add an ability in that unit's ability panel, it did not have that ability ingame.
 
Level 3
Joined
Sep 20, 2010
Messages
29
Thanks, guys, now it works correctly. You will laugh but I don't completely understand what I've fixed - but I've remade skill again and removed mage upgrades (ucut) from dummy unit. Thanks again =)
 
Status
Not open for further replies.
Top