HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dummy Spell causing issues with 'Charge'

05-19-2009, 11:52 PM#1
Kul'thran
okay, here's how it goes. There's a dummy unit, and no matter where I place it, it causes this problem. Here's the idea, the hero "charges" (teleports) an enemy, stunning them for 3 seconds.

Here's the triggers.

Trigger:
Charge Action
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Charge (Triggers)
Collapse Actions
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
Set SpecialFX = (Last created special effect)
Trigger - Run Special Effect Destruction <gen> (ignoring conditions)
Sound - Play WarriorHeroricLeap <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 1500.00
Set Stored_Unit[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
Wait 0.15 game-time seconds
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (Real(((Level of Charge (Triggers) for (Triggering unit)) x 1))) damage of attack type Hero and damage type Normal
Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (4.00 x (Real((Level of Charge (Triggers) for (Triggering unit))))))
Trigger:
Charge Teleport
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Charge (Triggers)
Collapse Actions
Set ChargeTempReal = (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast)))
Set ChargeTempReal = (ChargeTempReal + 180.00)
Unit - Order Dummy Caster (Charge Stun) 0068 <gen> to Neutral - Firebolt (Target unit of ability being cast)
Set ChargeTempPoint = (Position of (Target unit of ability being cast))
Unit - Move (Triggering unit) instantly to (ChargeTempPoint offset by 100.00 towards ChargeTempReal degrees), facing ChargeTempPoint
Custom script: call RemoveLocation( udg_ChargeTempPoint )
Unit - Order (Casting unit) to Attack Stored_Unit[(Player number of (Owner of (Triggering unit)))]
Okay, this should work, right? Right. Everything works except the stun. When I try to create a dummy spell based off Firebolt (Neutral), and give it no mana cost, my hero warps north about 100 yards away from her target instead of charging the enemy and stunning it. If I remove the dummy spell from the dummy unit, the charge works fine, except the unit is not stunned.

I copied this from Blizzard's "Extreme Candy Wars 2005," bit by bit with a few modifications, and yet this bug continues to occur.

What am I doing wrong? Anyone?

Here are some screenshots:

Preparing to Charge
Vanished!
Back north above the Spirit Lodge

Also, the cooldown stops working.
05-20-2009, 01:11 PM#2
rain9441
Quote:
Originally Posted by Kul'thran
Wait 0.15 game-time seconds
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (Real(((Level of Charge (Triggers) for (Triggering unit)) x 1))) damage of attack type Hero and damage type Normal
Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (4.00 x (Real((Level of Charge (Triggers) for (Triggering unit))))))

As soon as you do a wait in a trigger like this, Triggering unit and Target unit of ability being cast no longer exist or work the way you'd expect it to. They will be null.
05-20-2009, 02:30 PM#3
Kul'thran
Huh. I tried removing the wait, but she still teleports north of her target. :S

Edit: I tried making a separate map with the triggers; didn't work either. Same problem. :/

Edit 2: Ah HA! I got it to work. I just edited the dummy spell to have a cast time of .15 seconds, and it works! No more teleporting north! :D