I'm trying to make a custom spell that will 'teleport' the user to the target unit. However I've encountered some problems.
The trigger I am using is:
Event - generic unit starts effect of ability
Condition - ability = to MyAbilityName
Action - Move (Triggering Unit) instantly to (Position of (Target unit of Ability being cast)) with something something angles.
Now when I do that it works fine and moves the caster to the target unit just like I want. However here are the problems that exist:
1.It does not show the special effects I added to the spell.
2. It does not perform any actions after the move ability (for instance, I added a dummy caster to deal damage to the target unit but this did not happen).
3. There is no cooldown time for the ability - it can be used again instantly.
In trying to determine what was wrong I played around a bit and found something out but I don't know what it means or how I can fix the problem.
I added a Wait action of 0.01 seconds right before the Move Action. Now when I had my unit cast the spell it solved some of the problems:
1. It showed the special effects.
2. I actually don't know if it solved this one or not (the dummy unit didn't deal any damage but that was probably because it was out of range due to a different error).
3. The cooldown for the ability worked as I had wanted it to.
However by adding that Wait action I encountered a totally different problem: now my unit didn't perform the Move action. Everything else happened except the unit didn't actually move anywhere.
So does anyone know what I am doing wrong with the trigger and how I can correct it?
EDIT: Found a clumsy workaround which will have to do for now. Instead of having the move action be part of this trigger, I created a new trigger set to initially turned off:
Event - Periodic every 0.2 seconds
Action - Move MyVariableUnit instantly to AnotherVariableLocation,
Action - Turn off ThisTrigger
Then in my initial trigger when the spell was cast I had it turn on this trigger. For whatever reason doing things this way gets rid of all the problems I was having. Of course it;s not at all an optimal solution but at least it works.|||can you post the complete trigger that u have?|||Quote:
can you post the complete trigger that u have?
Is there any way to copy and paste the whole trigger from inside the game? Either way, I'll try to edit it in here later today.
No comments:
Post a Comment