• Visit Rebornbuddy
  • Demon Hunter Sentry Logic

    Discussion in 'Combat Routines' started by tozededao, Feb 9, 2015.

    1. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Hey, so in trinity Sentry is handled like this


      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: Feb 9, 2015
    2. Ryllaxz

      Ryllaxz New Member

      Joined:
      Jan 20, 2015
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      0
      but where to put that code in? need more info
       
    3. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      This isnt any code to put anywhere.
       
    4. xzjv

      xzjv Community Developer

      Joined:
      Mar 17, 2014
      Messages:
      1,243
      Likes Received:
      46
      Trophy Points:
      48

    Share This Page