You might want to use something like player x/y/z or 1/2/3, because this is a bit hard to follow. Either way I'm not sure how one would do this in data alone, but it shouldn't be too hard with a data-trigger hybrid. Using the unit uses ability event.
There's a function for ability target point/unit, so a behavior wouldn't be necessary. Though you will need a dummy effect of some sort for the ability.
Thanks for your replies so far. Not sure I quite understand though, especially since I am not that familiar with triggers. How would the trigger make the ability "know" where to teleport the unit?
That would require fixed points to be marked on the map, right?
My Mod will be playable on several different maps, meaning that the hidden dummy unit will be at different locations, depending on where the player spawns
this should be possible with data only (if each player has only one dummy unit). apply a behaviour on the target unit which uses a search effect which searches for the dummy unit owned by this player. this search effect applies a persistant at the dummy point. the persistant uses a teleport effect on the SOURCE unit (source should be the target unit) with target point of persistant effect.
in order to debug this register triggers with UI - effect used and display the name of the source and target units and ping the points.
Each player starts the game with a hidden invincible dummy unit, right above their main base.
I am trying to create a spell that works like this:
1. High Templar casts the spell on target friendly or enemy unit.
2. If the HT targets an enemy unit, that unit is immediately teleported to that players hidden invincible dummy unit.
3. If the HT targets a friendly unit, that unit is immediately teleported to his own hidden invincible dummy unit.
If there are several players in play, the spell will teleport a unit to THAT players dummy unit.
Any ideas on how to build this spell? Especially in regards on how to check where to teleport the unit...
You might want to use something like player x/y/z or 1/2/3, because this is a bit hard to follow. Either way I'm not sure how one would do this in data alone, but it shouldn't be too hard with a data-trigger hybrid. Using the unit uses ability event.
yeah, you need a trigger/ data hybrid. perhpase have the ability apply a behavior and then have triggers detect that behavior?
@joey101d: Go
There's a function for ability target point/unit, so a behavior wouldn't be necessary. Though you will need a dummy effect of some sort for the ability.
Thanks for your replies so far. Not sure I quite understand though, especially since I am not that familiar with triggers. How would the trigger make the ability "know" where to teleport the unit?
@Kabelkorven: Go
if owner of target unit = x, then move unit instantly to point A
if owner of target unit = y then move unit instantly to point B
That would require fixed points to be marked on the map, right?
My Mod will be playable on several different maps, meaning that the hidden dummy unit will be at different locations, depending on where the player spawns
this should be possible with data only (if each player has only one dummy unit). apply a behaviour on the target unit which uses a search effect which searches for the dummy unit owned by this player. this search effect applies a persistant at the dummy point. the persistant uses a teleport effect on the SOURCE unit (source should be the target unit) with target point of persistant effect.
in order to debug this register triggers with UI - effect used and display the name of the source and target units and ping the points.
@Kabelkorven: Go
You can create variables. You could base the point off where their starting structure is located.