HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggered Spell Doesn't Trigger Spell CD?

08-03-2008, 11:12 PM#1
Evincar
I have a Charge like ability that when casts moves the caster to the target and then a dummy stuns the target.

However, when the caster uses the skill it doesn't trigger the cool down of the ability.

How can I fix this?

Here are the triggers, if they are the cause of the problem.

Click image for larger version

Name:	ss1.JPG
Views:	10
Size:	64.1 KB
ID:	36163

Thanks in advance.
Attached Images
File type: jpgss1.JPG (64.1 KB)
08-03-2008, 11:47 PM#2
d07.RiV
Yes SetUnitPosition stops current order and cooldown doesn't activate. You can insert a Wait(0) or use SetUnitX/SetUnitY natives via custom script.

And in future, instead of attaching a JPEG screenshot, use the [ trigger ] .. [ /trigger ] tags (without the spaces), rightclick the header of your trigger (the one in the root of the tree, with the name of your trigger on it) and select copy as text.

Trigger:
Bolt
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Bolt
Collapse Actions
Set TempReal = (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast)))
Set TempReal = (TempReal + 180.00)
Set TempPoint = (Position of (Target unit of ability being cast))
Set TempPoint2 = (TempPoint offset by 100.00 towards TempReal degrees)
Custom script: call SetUnitX (GetTriggerUnit (), GetLocationX (udg_TempPoint2))
Custom script: call SetUnitY (GetTriggerUnit (), GetLocationY (udg_TempPoint2))
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPoint2)
Unit - Order (Triggering unit) to Attack (Target unit of ability being cast)
08-04-2008, 05:02 PM#3
Evincar
I found my error and realized I don't need a dummy unit to cast a stun. Thanks for your help.

The spell works properly as far as I can tell and the trigger looks like this.

Trigger:
Charge Teleport
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Intercept (Triggers)
Collapse Actions
Set TempReal = (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast)))
Set TempReal = (TempReal + 180.00)
Set TempPoint = (Position of (Target unit of ability being cast))
Set TempPoint2 = (TempPoint offset by 100.00 towards TempReal degrees)
Custom script: call SetUnitX (GetTriggerUnit (), GetLocationX (udg_TempPoint2))
Custom script: call SetUnitY (GetTriggerUnit (), GetLocationY (udg_TempPoint2))
Custom script: call RemoveLocation( udg_TempPoint)
Custom script: call RemoveLocation( udg_TempPoint2)
Unit - Order Player_Unit_Heroes[(Player number of (Owner of (Triggering unit)))] to Attack Stored_Unit[(Player number of (Owner of (Triggering unit)))]