A unit creates a building and through that building every hero who is on the same team respawns there
If the building dies there shall be no respawn possible, but when its rebuild anywhere the heroes shall respawn to the new location of the building.
so far the theory
here is what i have got:
gv
TerranRespawnWait = TerranRespawnWait <Point>
TerranRespawnValue = No Unit <Unit>
RespawnPointTerra = RespawnTerra <Point>
NoRespawnPointYet = NO SPAWN YET <Point>
Events
Unit - Any Unit dies
Local Variables
DeadHero = (Triggering unit) <Unit>
temp group = (Empty unit group) <Unit Group>
Conditions
((Unit type of (Triggering unit)) is Hero) == true
Actions
Unit Group - Pick each unit in (Any units in (Region((Position of (Triggering unit)), 0.0)) owned
by player Any Player matching Required: Item, with at most Any Amount) and do (Actions)
Actions
Unit Group - Add (Picked unit) to temp group
Unit - Hide (Picked unit)
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering player) <= 5
RespawnPointTerra != NO SPAWN YET
Then
General - Custom Script: UnitRevive (lv_deadHero);
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Create one (Unit type of (Picked unit)) item in the inventory of DeadHero
Unit - Move DeadHero instantly to RespawnTerra (No Blend)
Else
General - Custom Script: UnitRevive (lv_deadHero);
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Create one (Unit type of (Picked unit)) item in the inventory of DeadHero
Unit - Move (Triggering unit) instantly to TerranRespawnWait (No Blend)
Events
Unit - Any Unit uses EnableReviveGenerator at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Point - Move RespawnTerra To (Position of (Triggering unit))
Variable - Set TerranRespawnValue = (Triggering unit)
Unit - Move (Triggering unit) instantly to RespawnTerra (No Blend)
Events
Unit - TerranRespawnValue dies
Local Variables
Conditions
Actions
Point - Move RespawnTerra To NoRespawnPointYet
This works so far the building is alive and the ability is used. All heroes respawn nice.
Also if i destroy the building and rebuilt it + ability use, the heroes die and will respawn correct.
But if a hero dies while there is no building and ability used he is "lost in space" at TerranRespawnWait
And i dont know how to get him back.
I tried it with an attachment to a region but this works only for the last triggered unit and when i press the ability he is warped back to building what shouldnt happen after he is revived.
[solved]
RespawnLostInSpaceHeroes
Events
Unit - Any Unit is revived
Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering player) <= 5
Then
General - Wait for (Conditions), checking every 1.0 Game Time seconds
Conditions
RespawnPointTerra != NO SPAWN YET
Unit - Move (Triggering unit) instantly to RespawnTerra (No Blend)
Else
tadaaaaaaaaaaaaaaaaaaaaa :D
if u have better solutions let me know.
A unit creates a building and through that building every hero who is on the same team respawns there
If the building dies there shall be no respawn possible, but when its rebuild anywhere the heroes shall respawn to the new location of the building.
so far the theory
here is what i have got:
gv
TerranRespawnWait = TerranRespawnWait <Point>
TerranRespawnValue = No Unit <Unit>
RespawnPointTerra = RespawnTerra <Point>
NoRespawnPointYet = NO SPAWN YET <Point>
trigger 1: Respawn
____________________________________________________________
Events
Unit - Any Unit dies
Local Variables
DeadHero = (Triggering unit) <Unit>
temp group = (Empty unit group) <Unit Group>
Conditions
((Unit type of (Triggering unit)) is Hero) == true
Actions
Unit Group - Pick each unit in (Any units in (Region((Position of (Triggering unit)), 0.0)) owned
by player Any Player matching Required: Item, with at most Any Amount) and do (Actions)
Actions
Unit Group - Add (Picked unit) to temp group
Unit - Hide (Picked unit)
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Remove (Picked unit) from the game
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering player) <= 5
RespawnPointTerra != NO SPAWN YET
Then
General - Custom Script: UnitRevive (lv_deadHero);
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Create one (Unit type of (Picked unit)) item in the inventory of DeadHero
Unit - Move DeadHero instantly to RespawnTerra (No Blend)
Else
General - Custom Script: UnitRevive (lv_deadHero);
Unit Group - Pick each unit in temp group and do (Actions)
Actions
Unit - Create one (Unit type of (Picked unit)) item in the inventory of DeadHero
Unit - Move (Triggering unit) instantly to TerranRespawnWait (No Blend)
trigger 2: RespawnReLocator
__________________________________________________________________________________________________
Events
Unit - Any Unit uses EnableReviveGenerator at Generic6 - Complete stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Point - Move RespawnTerra To (Position of (Triggering unit))
Variable - Set TerranRespawnValue = (Triggering unit)
Unit - Move (Triggering unit) instantly to RespawnTerra (No Blend)
Trigger 3: RespawnLocator
___________________________________________________________________________________________
Events
Unit - TerranRespawnValue dies
Local Variables
Conditions
Actions
Point - Move RespawnTerra To NoRespawnPointYet
This works so far the building is alive and the ability is used. All heroes respawn nice.
Also if i destroy the building and rebuilt it + ability use, the heroes die and will respawn correct.
But if a hero dies while there is no building and ability used he is "lost in space" at TerranRespawnWait
And i dont know how to get him back.
I tried it with an attachment to a region but this works only for the last triggered unit and when i press the ability he is warped back to building what shouldnt happen after he is revived.
[solved]
RespawnLostInSpaceHeroes
Events
Unit - Any Unit is revived
Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Triggering player) <= 5
Then
General - Wait for (Conditions), checking every 1.0 Game Time seconds
Conditions
RespawnPointTerra != NO SPAWN YET
Unit - Move (Triggering unit) instantly to RespawnTerra (No Blend)
Else
tadaaaaaaaaaaaaaaaaaaaaa :D
if u have better solutions let me know.