Hey guys!
I Would like to ask for some help with a World Editor-related problem.
I have set up a trigger where you cast a spell on an allied or enemy hero. After you finish channeling the spell, the targeted hero will instantly teleport to his respective spawning area. I had quite some trouble with moving the hero itself, because "Move Unit" didn't do anything but stun the unit, but eventually figured out that with a quick global Blink item it can be solved, so now it works. (technically the spell might be ruined if target hero has already full inventory, but I could not come up with a better solution since I don't really know how SetUnitX and Y custom scripts should work.)
The only problem is that there is an "If" condition which checks which side the targeted hero is on, and blinks him/her to said location; however, for some reason the condition always ends with the "Else" branch fulfilled, so it always teleports to the Team 2 spawn location (HeroSpawnScourge), regardless of targeted hero's team.(Which results in Team 1 heroes slaughtered down in a second by Team 2 defenses but that's beside the point) I tried to set the condition as "Target unit of ability being cast is owned by an Ally/Enemy of Player 1/7, but that yielded the same result as Target unit of ability being cast is in Units owned by Player 1-6/7-12 (or Target unit of ability being cast is in Units playable map area owned by Player 1, as you can see in the first example, too).
Any ideas how can I make it work properly, with heroes from Team 1 blinking to Team 1 spawn properly?
(Team 2 works so it's half working at least, but that is not yet quite perfect for me
)
See the trigger itself below.
Thanks for the help in advance!
I Would like to ask for some help with a World Editor-related problem.
I have set up a trigger where you cast a spell on an allied or enemy hero. After you finish channeling the spell, the targeted hero will instantly teleport to his respective spawning area. I had quite some trouble with moving the hero itself, because "Move Unit" didn't do anything but stun the unit, but eventually figured out that with a quick global Blink item it can be solved, so now it works. (technically the spell might be ruined if target hero has already full inventory, but I could not come up with a better solution since I don't really know how SetUnitX and Y custom scripts should work.)
The only problem is that there is an "If" condition which checks which side the targeted hero is on, and blinks him/her to said location; however, for some reason the condition always ends with the "Else" branch fulfilled, so it always teleports to the Team 2 spawn location (HeroSpawnScourge), regardless of targeted hero's team.(Which results in Team 1 heroes slaughtered down in a second by Team 2 defenses but that's beside the point) I tried to set the condition as "Target unit of ability being cast is owned by an Ally/Enemy of Player 1/7, but that yielded the same result as Target unit of ability being cast is in Units owned by Player 1-6/7-12 (or Target unit of ability being cast is in Units playable map area owned by Player 1, as you can see in the first example, too).
Any ideas how can I make it work properly, with heroes from Team 1 blinking to Team 1 spawn properly?
(Team 2 works so it's half working at least, but that is not yet quite perfect for me
See the trigger itself below.
Thanks for the help in advance!

Last edited: