Is there any way to de-spawn an enemy when the player leaves without killing him ? for example when it flees and goes back to starting point, to despawn him but not destroying the combatant spawner.
  • No, there's no despawning - but you can use the hunting range settings to automatically return (move) to the spawn position when moving out of range.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2017
    Yes this is what i do, but now with unity 5.6 navmesh that the player projects navmesh that builds on runtime, at x meters from the player, (which is what I use due to procedurally generated world), when this happens and I get away from the spot, there is no navmesh for the enemy to get back, and I get console errors.
    Post edited by dlevel on
  • edited September 2017
    Hm, you could use the Move AI Range settings (Battle System > Battle Settings) to also block the combatant's move AI at that distance to the player.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2017
    Well thats an option and I tried it, it kinda works but again I get the error of navmesh some times.

    "Stop" can only be called on an active agent that has been placed on a NavMesh.
    UnityEngine.AI.NavMeshAgent:set_isStopped(Boolean)
    ORKFramework.Behaviours.MoveAIComponent:Stop()
    ORKFramework.Behaviours.MoveAIComponent:ClearTarget(Boolean)
    ORKFramework.CombatantBattle:ClearBattle(Boolean)
    ORKFramework.CombatantBattle:EndBattle()
    ORKFramework.CombatantHandler:EndBattle()
    ORKFramework.Battle:set_RealTimeAreaCount(Int32)
    ORKFramework.Behaviours.RealTimeBattleArea:OnDisable()

    I guess it tries to move or something?
    Post edited by dlevel on
  • edited September 2017
    Yes - the agent isn't on/near a NavMesh, so the move AI trying to move or stop the combatant results in a warning (not an error). You can pretty much ignore that message :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.