diff --git a/OpenRA.Mods.Common/Traits/Buildings/Exit.cs b/OpenRA.Mods.Common/Traits/Buildings/Exit.cs index 9f1695ff45..54b35ac4a9 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Exit.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Exit.cs @@ -26,6 +26,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("AttackMove to a RallyPoint or stay where you are spawned.")] public readonly bool MoveIntoWorld = true; + + [Desc("Number of ticks to wait before moving into the world.")] + public readonly int ExitDelay = 0; } public class Exit { } diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index d143263bba..a07d97e7f8 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -77,6 +77,9 @@ namespace OpenRA.Mods.Common.Traits { if (exitinfo.MoveIntoWorld) { + if (exitinfo.ExitDelay > 0) + newUnit.QueueActivity(new Wait(exitinfo.ExitDelay)); + newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit)); newUnit.QueueActivity(new AttackMoveActivity( newUnit, move.MoveTo(exitLocation, 1)));