tozededao
Community Developer
- Joined
- Jan 15, 2010
- Messages
- 1,225
- Reaction score
- 5
Hey, so in trinity Sentry is handled like this
This is a big issue though, if you can always cast it it will just spam it and do nothing else. Is there any way to retrieve the number of Sentries within a certain range? So we can make it only cast if there isn't a certain ammount of sentries near our priority target?
It would be probably something like :
We would need to find a way to count the max number of turrets that we can use, MaxNumberOfTurrets should be 2. If we have Custom Engineering (MaxNumberOfTurrets ++) if we have Bombardiers Rucksack (MaxNumberOfTurrets+=2)
And we need to find a way to count the number of active turrets withing a certain range from a monster.
Code:
// Sentry Turret
if (!Player.IsIncapacitated && CanCast(SNOPower.DemonHunter_Sentry, CanCastFlags.NoTimer) &&
TargetUtil.AnyMobsInRange(65))
{
return new TrinityPower(SNOPower.DemonHunter_Sentry, 75f, TargetUtil.GetBestClusterPoint(35f, 75f, false));
}
This is a big issue though, if you can always cast it it will just spam it and do nothing else. Is there any way to retrieve the number of Sentries within a certain range? So we can make it only cast if there isn't a certain ammount of sentries near our priority target?
It would be probably something like :
Code:
// Sentry Turret
if (!Player.IsIncapacitated && CanCast(SNOPower.DemonHunter_Sentry, CanCastFlags.NoTimer) &&
TargetUtil.AnyMobsInRange(65)[B] && TurretCountNearPriorityTarget < MaxNumberOfTurrets[/B])
{
return new TrinityPower(SNOPower.DemonHunter_Sentry, 75f, TargetUtil.GetBestClusterPoint(35f, 75f, false));
}
We would need to find a way to count the max number of turrets that we can use, MaxNumberOfTurrets should be 2. If we have Custom Engineering (MaxNumberOfTurrets ++) if we have Bombardiers Rucksack (MaxNumberOfTurrets+=2)
And we need to find a way to count the number of active turrets withing a certain range from a monster.
Last edited: