After a few hours of trial and error I have created a spell that works like this:
Target any unit. That unit is immediately teleported to the nearest Hatchery, Nexus or Command Center.
There is however a major problem that I can not solve... Whenever a unit is targeted, that unit is teleported to the nearest Hatchery, Nexus or Command Center controlled by ANY player!
I want the unit to be teleported to the nearest Hatchery, Nexus or Command Center controlled by the same player!
For example, if I target a unit owned by Player 7, I want that unit to be teleported to the nearest Hatchery, Nexus or Command Center controlled by player 7!
I thought the same thing but it turned out to not work. Even if I set the Search Filter to Player, the targeted unit is still teleported to the closest Hatchery, Nexus or Command Center owned by any player. I have also played around with Player Type validator without any success.
I upload four pictures of the setup of my ability, in case anyone want to take a look at it.
@Buff - The buff is there to give the controller of the targeted unit some time to react before it gets teleported away. It is not necessary for the ability to function.
---
@Effect tree
The ability adds a buff at target unit.
The buff expires after 3 seconds and the expire effect applies a search effect with radius 500, thus searching the whole map.
The search effect applies a set effect that has validators checking for Hatchery, Nexus or CC. The set effect applies a create unit effect, creating a dummy unit at the closest Hatchery, Nexus or CC.
The create unit effect applies a persistent effect at the location of the created dummy unit, which is linked to a teleport effect that teleports the targeted unit to the location of the newly created dummy unit.
---
This ability follows the steps of the "Dark Templar Recall To Dark Shrine" behavior to a high degree, where the death of a Dark Templar makes it become teleported to the closest Dark Shrine, controlled by the player.
Everyhing seems to work fine with my ability, except that I can't figure out how to make the teleported unit become teleported to the closest Hatchery, Nexus or CC controlled by the same player. Just to clarify - so for example if a unit by player 3 is teleported by this ability, I want it to be teleported to the closest Hatchery, Nexus or CC of player 3.
So Caster targets the unit, there is a delay during which the target player gets notification. After the Prepare? phase or after a Create Persistent effect acts as a delay.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Not sure what you mean. The only delay in my ability is the duration of the buff, which currently is 3 seconds. If I remove the buff part of my ability altogether, everything happens without any delay.
Any ideas how to ensure that a unit is teleported to a structure owned by that player?
I need to know how you have structured the ability. From the pictures you have sent there are 2 Search Area effects in your ability of undefined sequence. Both of which could be the cause.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Ah I see, well there is only one search effect in my effect tree.
The effects in my ability are - and I write the effect type within parenthesis to clarify - as follows:
Unsummon Add Buff (Apply Behavior)
Unsummon Search For Player Main Base (Search Effect)
Unsummon Set To Find Player Main Base (Set)
Unsummon Create Player Precursor (Create Unit)
Unsummon Persistent Player Teleport Dummy (Create Persistent)
Unsummon Player Teleport (Teleport)
I also upload a test map with this ability so you, or anyone else reading this, can see how it looks in the editor. Edit: Nevermind, forgot that maps can't be attached : /
If the buff is doing the searching you will need to specify the caster else it could use the source player. I would use a Set effect to apply the behaviour and do the search that the Teleport effect then references to find the target of the Set.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Thanks for the advice, but despite my new experiments and redesign of the spell, it still refuses to teleport units to a Hatchery, Nexus or CC owned by that player >.<
I've tried different setups - just Player.. and Player, Ally, Enemy and Neutral.. and Structure. I've also experimented Player Type and Player Race - validators, without any success.
On the picture I attached above, the setup I use there is Excluded: Ally, Enemy, Neutral
So you use a Set effect on the target that applies a buff and uses a Search Area effect that applies a second Set effect on the target town centre and uses a Create Unit and Create Persistent effect. After a delay the persistent uses a Teleport effect that has the Target: Target - Effect field is set to the second Set effect and the Effect: Unit - Effect field set to the first Set effect.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Any idea how to fit a validator or a chain of effects in there that ensures that units are teleported to their own home base?
The teleport part seems to work fine in my ability, except that units are not teleported to their home base. (For example, the spell is cast on a unit owned by player 2, then it should be teleported to the closest CC, Nexus or Hatchery owned by player 2)
I would use a Set effect on the target and then launch the global Search Area effect with a target sort for distance from the caster using the player filter that then applies a second set to the town centre. The Teleport effect then uses both sets to determine to teleport what to where.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Thanks for your continued help Doctor, but the approach you suggest is what I already use and it does not work, which is why I created this thread : /
When I use the Player filter on the search effect, all targets are teleported to the nearest CC, Nexus or Hatchery of the caster. Just to clarify - if Player 1 for instance is the caster of the spell and targets a unit owned by player 2, that unit is teleported to the home base of Player 1.
If I instead set the Search effect to Player, Ally, Enemy and Neutral, the targeted unit is teleported to the closest main base, regardless of who owns it.
I find no validator or set of effects that makes the targeted unit become teleported to its own base. : /
After a few hours of trial and error I have created a spell that works like this:
Target any unit. That unit is immediately teleported to the nearest Hatchery, Nexus or Command Center.
There is however a major problem that I can not solve... Whenever a unit is targeted, that unit is teleported to the nearest Hatchery, Nexus or Command Center controlled by ANY player!
I want the unit to be teleported to the nearest Hatchery, Nexus or Command Center controlled by the same player!
For example, if I target a unit owned by Player 7, I want that unit to be teleported to the nearest Hatchery, Nexus or Command Center controlled by player 7!
Any ideas how to determine this?
Check the filters of your Search Area effect. The Search: Search Filters field is what you need. Set the Player flag to the only one.
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 Doctor,
I thought the same thing but it turned out to not work. Even if I set the Search Filter to Player, the targeted unit is still teleported to the closest Hatchery, Nexus or Command Center owned by any player. I have also played around with Player Type validator without any success.
I upload four pictures of the setup of my ability, in case anyone want to take a look at it.
Why you adding a buff? What exactly is your effect tree?
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
@Buff - The buff is there to give the controller of the targeted unit some time to react before it gets teleported away. It is not necessary for the ability to function.
---
@Effect tree
The ability adds a buff at target unit.
The buff expires after 3 seconds and the expire effect applies a search effect with radius 500, thus searching the whole map.
The search effect applies a set effect that has validators checking for Hatchery, Nexus or CC. The set effect applies a create unit effect, creating a dummy unit at the closest Hatchery, Nexus or CC.
The create unit effect applies a persistent effect at the location of the created dummy unit, which is linked to a teleport effect that teleports the targeted unit to the location of the newly created dummy unit.
---
This ability follows the steps of the "Dark Templar Recall To Dark Shrine" behavior to a high degree, where the death of a Dark Templar makes it become teleported to the closest Dark Shrine, controlled by the player.
Everyhing seems to work fine with my ability, except that I can't figure out how to make the teleported unit become teleported to the closest Hatchery, Nexus or CC controlled by the same player. Just to clarify - so for example if a unit by player 3 is teleported by this ability, I want it to be teleported to the closest Hatchery, Nexus or CC of player 3.
So Caster targets the unit, there is a delay during which the target player gets notification. After the Prepare? phase or after a Create Persistent effect acts as a delay.
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
Not sure what you mean. The only delay in my ability is the duration of the buff, which currently is 3 seconds. If I remove the buff part of my ability altogether, everything happens without any delay.
Any ideas how to ensure that a unit is teleported to a structure owned by that player?
I need to know how you have structured the ability. From the pictures you have sent there are 2 Search Area effects in your ability of undefined sequence. Both of which could be the cause.
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
Ah I see, well there is only one search effect in my effect tree.
The effects in my ability are - and I write the effect type within parenthesis to clarify - as follows:
I also upload a test map with this ability so you, or anyone else reading this, can see how it looks in the editor. Edit: Nevermind, forgot that maps can't be attached : /
If the buff is doing the searching you will need to specify the caster else it could use the source player. I would use a Set effect to apply the behaviour and do the search that the Teleport effect then references to find the target of the Set.
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 advice, but despite my new experiments and redesign of the spell, it still refuses to teleport units to a Hatchery, Nexus or CC owned by that player >.<
Any more advice?
What is the filters of your Search Area effect set to again?
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
I've tried different setups - just Player.. and Player, Ally, Enemy and Neutral.. and Structure. I've also experimented Player Type and Player Race - validators, without any success.
On the picture I attached above, the setup I use there is Excluded: Ally, Enemy, Neutral
So you use a Set effect on the target that applies a buff and uses a Search Area effect that applies a second Set effect on the target town centre and uses a Create Unit and Create Persistent effect. After a delay the persistent uses a Teleport effect that has the Target: Target - Effect field is set to the second Set effect and the Effect: Unit - Effect field set to the first 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
Yes, that is a fair summary.
Any idea how to fit a validator or a chain of effects in there that ensures that units are teleported to their own home base?
The teleport part seems to work fine in my ability, except that units are not teleported to their home base. (For example, the spell is cast on a unit owned by player 2, then it should be teleported to the closest CC, Nexus or Hatchery owned by player 2)
I would use a Set effect on the target and then launch the global Search Area effect with a target sort for distance from the caster using the player filter that then applies a second set to the town centre. The Teleport effect then uses both sets to determine to teleport what to where.
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 your continued help Doctor, but the approach you suggest is what I already use and it does not work, which is why I created this thread : /
When I use the Player filter on the search effect, all targets are teleported to the nearest CC, Nexus or Hatchery of the caster. Just to clarify - if Player 1 for instance is the caster of the spell and targets a unit owned by player 2, that unit is teleported to the home base of Player 1.
If I instead set the Search effect to Player, Ally, Enemy and Neutral, the targeted unit is teleported to the closest main base, regardless of who owns it.
I find no validator or set of effects that makes the targeted unit become teleported to its own base. : /
Oh so you want it sent to the target player base. Now that is a different problem.
I would use a Unit Filters validator that compares the target of the search vs the target of the Set effect applied to the target if it is player.
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