Two things I need help with making:
1:
Blight like Effect
Wanted buildings to have ability blight growth small and blight growth large
with other custom texture without replacing original blight tile (I need original tile for WC3 Undead race).
If someone does not know above mentioned abilities; Blight growth ability is one that creates blighted ground around a building when a building completes construction (and remains even after building is lost).
2:
Paired Units
Writing this in pseudocode. Think this is more easy to understand.
/*For every Building->A there exists Unit->B with ability Invulnerable (Neutral)*/
When A is Built
{
Create B for current owner of A near A;
}
When A is repaired to Max Health
{
Change owner of A to owner of Repairing Unit
Create B for current owner of A near A;
}
When A is Damaged AND Health of A < 50% of Max Health of A
{
Change owner of A to Neutral;
Bring B near A;
Remove B;
}
When A changes owner
{
Change owner of B to new owner of A;
}
Main problem is maintaining index i.
Secondly if you have ever played Lock-and-Key a condition of Lock-Key-Lock-Key-... can arise where Building (A) can change owners rapidly depending on player moves.
1:
Blight like Effect
Wanted buildings to have ability blight growth small and blight growth large
with other custom texture without replacing original blight tile (I need original tile for WC3 Undead race).
If someone does not know above mentioned abilities; Blight growth ability is one that creates blighted ground around a building when a building completes construction (and remains even after building is lost).
2:
Paired Units
Writing this in pseudocode. Think this is more easy to understand.
/*For every Building->A there exists Unit->B with ability Invulnerable (Neutral)*/
When A is Built
{
Create B for current owner of A near A;
}
When A is repaired to Max Health
{
Change owner of A to owner of Repairing Unit
Create B for current owner of A near A;
}
When A is Damaged AND Health of A < 50% of Max Health of A
{
Change owner of A to Neutral;
Bring B near A;
Remove B;
}
When A changes owner
{
Change owner of B to new owner of A;
}
Main problem is maintaining index i.
Secondly if you have ever played Lock-and-Key a condition of Lock-Key-Lock-Key-... can arise where Building (A) can change owners rapidly depending on player moves.