edited December 2016 in ORK Support
Hello!
I am trying to figure if and eventually how is possible to achieve a enemy detection in real time setup. Let me explain: the whole scene is real time, so battle can be engaged always. But i would like to know:
- can somehow show if a monster noticed the player and is trying to reach/attack him?
- can i check if there are combatant of enemy type in the scene as a requirement?
I don't know if anyone played Might and Magic series, but in that case there is a gem that change colors depending on the situation: green if it is a zone free of monsters or they are really far, yellow if there are monsters near, red if the enemy is engaged or noticed the player. May i setup this somehow?

2) Side question: is it possible to let the player binds keyboard keys at own desire with some option?

EDIT: 3) I noticed that the enemy in real time battle starts pursuing the player even if is blocked by a wall (not in line of sight), is there a settings to prevent being alerted if there are obstacles between them and the combatant can't see the player?

Thanks ^_^
Post edited by Kaemalux on
  • edited December 2016
    1) Here's some rough idea of what to do:
    Raycast nodes could help you check if the ray hit the player.
    If it hits the player trigger have it show a dialogue node or spawn prefab node to show the player is seen.
    Also using distance checks with the raycast you can set up something that can act as an aggro range as the player approaches enemies.

    2) I believe Control Maps could help with setting up inputs key binds

    =]



    Post edited by relenting_1 on
    Portfolio - My Website
    Follow my project on Reddit - My Game DevLog
    relentingVids - My YouTube Channel
    Half Super Shop - My Shop
  • 1+3) That's pretty much what the move AI is there for. Detecting enemies of the user and chasing after them. To prevent them detecting you through the wall, you can use the raycast options in the detection settings.

    Regarding checking if enemy combatants are in the scene or nearby - this can be done using the event system using a Search Combatants node to store them into a found objects list and check if any where found using a Found Objects Count node.

    2) You'd have to use a custom input solution that allows the player to remap keys, don't know if Unity's input manager allows remapping in-game. ORK's input keys allow you to use custom inputs, i.e. if the custom input can be remapped, ORK will just get the input from a different key through the custom input.
    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!
  • I totally missed raycast detection, my combatant entered in battle just with player near... Thanks!

    I will try that search combatants solution, really nice! About the enemy entering in battle is there some sort of event can i call? ANd if yes, from where should i call it?

    You were really helpful GiL, thank you!
  • If the whole scene is a real time battle area, you're already constantly in battle (and so is the enemy). Otherwise, you can use the auto battle options in your combatant's settings to define in which distance a battle starts, which would start an arena battle (using Battle components), i.e. battle start/end events are used.
    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!
  • Sorry, i made it not clear. I mean if i can call an event when the enemy is detecting the player, to show something like a warning.
    In my first example with gems, translated to Ork, it would be:
    - entering a scene, i call "search combatants" event and i show the player if there are monsters
    - monsters are roaming, but noone is attacking the player
    - if the player is seen by a monster, it starts attacking the player, and there is a warning that combat is engaged (even if from an Ork point of view battle already started upon scene entering).
    It is last point that i am missing, may i achieve that somehow?
    Thanks!
  • Not upon detection, but you can use the move AI nodes in the event system (and battle AI) to do checks, like if a combatant was detected by another's move AI.

    I.e. you could run regular checks, searching for combatants nearby the player and check their move AI.
    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.