public static void SetLeader(int EntityID, int LeaderID) { EntityAliveSDX myEntity = GameManager.Instance.World.GetEntity(EntityID) as EntityAliveSDX; EntityAlive LeaderEntity = GameManager.Instance.World.GetEntity(LeaderID) as EntityAlive; if (myEntity && LeaderEntity) { myEntity.Buffs.SetCustomVar("Leader", LeaderID, true); myEntity.moveSpeed = LeaderEntity.moveSpeed; myEntity.moveSpeedAggro = LeaderEntity.moveSpeedAggro; myEntity.SetSpawnerSource(EnumSpawnerSource.StaticSpawner); SetCurrentOrder(EntityID, Orders.Follow); } }