I'm trying to duplicate the Town Portal effect from Wc3. For those who don't know, it's an item that when cast makes the hero invulnerable but unable to attack and move for 5 seconds and then teleports him and nearby units to target building.
What I have is the following, and although the hero does become invulnerable and unable to move and attack for 5 seconds, he and nearby units do not teleport.
Scroll of Town Portal ( Apply Behavior) - Behavior is applied to the casting unit and is made unable to move, attack and is invulnerable. Has a duration of 5.
Scroll of Town Portal ( Search) - When the behavior expires, this effect is triggered. It has an area of 360 degrees and 10 units. Units in the area are targeted by a teleport effect.
Scroll of Town Portal (Teleort) - This is a teleport effect with "Target: (Scroll of Town Portal ( Apply Behavior) )Target Point" and "(None): Target."
I usually add in a Set effect containing only the initial ability effect (in this case the Apply Behavior one). The Set executes at the point targeted by the ability, unlike the Apply Behavior effect which only stores the unit it actually affects. (eg the casting hero)
You can use any other effect type that can immediately chain another effect, but I don't think you can grab the Ability Target directly.
Iirc the original also had a "quick-cast" option where it would automatically choose the nearest main building, in that case you can use the Target of the initial search effect (used to locate the nearest town hall) as the teleport target and don't need the dummy Set. You'd probably have to make that a seperate ability though.
Use an ability of the Effect - Target variety that applies a Set effect to the target town center. The effect then applies a Buff behaviour that does the supress movement supress attack invulnerable etc that has a set duration. When the duration expires it then uses a Teleport effect to the target of the previous Set effect.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I'm trying to duplicate the Town Portal effect from Wc3. For those who don't know, it's an item that when cast makes the hero invulnerable but unable to attack and move for 5 seconds and then teleports him and nearby units to target building.
What I have is the following, and although the hero does become invulnerable and unable to move and attack for 5 seconds, he and nearby units do not teleport.
Scroll of Town Portal ( Apply Behavior) - Behavior is applied to the casting unit and is made unable to move, attack and is invulnerable. Has a duration of 5.
Scroll of Town Portal ( Search) - When the behavior expires, this effect is triggered. It has an area of 360 degrees and 10 units. Units in the area are targeted by a teleport effect.
Scroll of Town Portal (Teleort) - This is a teleport effect with "Target: (Scroll of Town Portal ( Apply Behavior) )Target Point" and "(None): Target."
I usually add in a Set effect containing only the initial ability effect (in this case the Apply Behavior one). The Set executes at the point targeted by the ability, unlike the Apply Behavior effect which only stores the unit it actually affects. (eg the casting hero)
You can use any other effect type that can immediately chain another effect, but I don't think you can grab the Ability Target directly.
Iirc the original also had a "quick-cast" option where it would automatically choose the nearest main building, in that case you can use the Target of the initial search effect (used to locate the nearest town hall) as the teleport target and don't need the dummy Set. You'd probably have to make that a seperate ability though.
Use an ability of the Effect - Target variety that applies a Set effect to the target town center. The effect then applies a Buff behaviour that does the supress movement supress attack invulnerable etc that has a set duration. When the duration expires it then uses a Teleport effect to the target of the previous Set effect.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Thanks for the help but I can't seem to get it to work. I think it'll be easier just to trigger it.