HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dummy Spell Problems

07-25-2007, 01:37 AM#1
Castlemaster
For some reason this trigger will summon the dummy caster, and add the spell, but not cast the dummy spell. I've even changed it so I can control the dummy caster and commanded it to cast it no problem, yet the command line seems to not fire. Here is the code.
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Blood Torrent
Collapse Actions
Set TempPoint = (Target point of ability being cast)
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
Unit - Add Blood Torrent Dummy Spell (Enemy) to (Last created unit)
Unit - Set level of Blood Torrent Dummy Spell (Enemy) for (Last created unit) to (Level of Blood Torrent for (Casting unit))
Unit - Order (Last created unit) to Neutral Beastmaster - Stampede (TempPoint offset by 100.00 towards (Random angle) degrees)
Custom script: call RemoveLocation (udg_TempPoint)

Blood Torrent is the Dummy Spell
Blood Torrent Dummy Spell is based off stampede
EDIT: The 8 second timer is there because the spell only lasts 5 seconds. But the spell is not cast at all, rather than just being cut short.

It's supposed to cast a spell, then a dummy caster will cast stampede in a random direction.

Thanks ahead of time
07-25-2007, 02:33 AM#2
sas_Skorpion
Well are u sure 8 seconds is enough ?
07-25-2007, 03:42 AM#3
Ghan_04
Have you tried using a set angle? If you do that and it works, you know where the problem is.
07-25-2007, 04:30 AM#4
GamesSmash
If your dummy's scaling value is set to less then 1.00, it will cause problems in your spell (like a tiny stampede). Try to set your dummy's scaling value to 1.
07-25-2007, 01:08 PM#5
Castlemaster
I just realized that all dummy spells I have made that order the dummy unit to cast a spell with a target point do not work (such as 'Death and Decay' and 'Summon Infernal').
Trigger:
Unit - Order (Last created unit) to Neutral Beastmaster - Stampede (TempPoint offset by 100.00 towards (Random angle) degrees)
Does this line of code need to be written as coordinates, or using a different location system?
07-25-2007, 01:19 PM#6
Anitarf
Perhaps your dummy unit doesn't have enough starting mana to cast the spells?

Also, your trigger leaks a location (the offset of TempPoint).
07-25-2007, 02:53 PM#7
Castlemaster
I already checked that by removing the 'locust' ability from my dummy unit. When I select the unit and click on its appropriate spell, it casts the spell with no problem. Here are problems I have ruled out with testing:
--The dummy spell 'blood torrent' is not activating the trigger
--The dummy unit is not being summoned
--The dummy unit is not recieving the ability
--The dummy unit cannot cast the ability
The only part of this trigger that will not work is the command line.
07-25-2007, 04:32 PM#8
Ghan_04
Does it work if you don't use a random angle?
07-25-2007, 05:05 PM#9
Anitarf
Did you try using a debug message at the end of the trigger to see if the trigger finishes properly and just the order action doesn't work, or if the trigger itself somehow gets interrupted just before the order action, but after adding the ability to the dummy unit?
07-25-2007, 08:17 PM#10
Castlemaster
I tried to test the other possibilities and changed my code:
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Blood Torrent
Collapse Actions
Set TempPoint = (Target point of ability being cast)
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
Unit - Add Blood Torrent Dummy Spell (Enemy) to (Last created unit)
Unit - Set level of Blood Torrent Dummy Spell (Enemy) for (Last created unit) to (Level of Blood Torrent for (Casting unit))
Game - Display to (All players) the text: Part 1 of the Trigg...
Custom script: call RemoveLocation (udg_TempPoint)
Set TempPoint = ((Target point of ability being cast) offset by 100.00 towards 0.00 degrees)
Unit - Order (Last created unit) to Neutral Beastmaster - Stampede TempPoint
Game - Display to (All players) the text: (Name of (Last created unit))
Custom script: call RemoveLocation (udg_TempPoint)

When I ran this trigger, the following things occurred:
1. The stampede spell was never cast (even after adjusting the angle)
2. The first text displayed in game (Anitarf's theory)
3. The name of the (last created unit) was displayed (meaning that the command referencing the (last created unit) is referencing the correct unit)

If anyone can make a dummy caster that can cast a spell on a point, please show me the code. This is something very simple yet is ineffective.
07-25-2007, 08:44 PM#11
Pyrogasm
Maybe the range on the dummy spell is too short?

Oh, and this line still leaks a location:
Trigger:
Set TempPoint = ((Target point of ability being cast) offset by 100.00 towards 0.00 degrees)
07-25-2007, 08:48 PM#12
Ghan_04
> Maybe the range on the dummy spell is too short?

But then wouldn't the dummy just move within range to cast it?
07-25-2007, 08:56 PM#13
Pyrogasm
Not if the dummy has no movement.

You could also try adding a wait in there before ordering the unit (store it to a variable first) to stampede.
07-26-2007, 11:21 PM#14
Castlemaster
OK I finally made some headway.
The range is irrelevant, and doing the wait command did nothing, however I found out that the dummy unit will cast shockwave (a non-channeled point target spell) but will not cast stampede (a channeled point target spell) unless I manually cast it. So I have a strong feeling that there is something about channeling spells causing the problem.

My dummy caster is based off a toad. I changed my dummy caster to a peasant, and Rexxar, and yet neither of them cast the spell. Hopefully that helps someone make sense of this conundrum.
07-26-2007, 11:42 PM#15
Pyrogasm
Did you try creating a non-dummy unit instead of a dummy. Say, for instance, that you create an Archmage, add the ability to it, and then order it to channel.