Hi! I encountered a weird problem...

In my game the npc that roam around is the same as my ally in my player group (same combatant), and since the npc that roams around need the move AI, and the simple move AI script by default doesn't have the speed smoothing that I want, I attached the Simply Move Script on my own and set the speed smoothing parameter to the combatant prefab. Everything is fine until when I trigger battle with that npc, the npc is fine but my ally (which is the same combatant as the npc) started moving around due to the simple move script component attached to them. Anyway I can solve this?

Thanks!
  • You can disable moveAI on battle start for each NPC with that component. You can also switch moveAI to one that doesn't have random patrol.
    Miuratale : coming 2024
    Miuratale
  • Thanks for the suggestion! However, I have too many combatants with moveAI attached on them, and the player group only consists of 3 members of the player's choice. So if I were to use this method, do I need to disable moveAI for all NPCs with simple move script in the battle start event? That might take hundreds of nodes..is there a much simpler way, such as setting it at the combatant settings whereby during battle moveAI is disabled or such?

    Thanks!
  • What's the move AI's setup and which battle system are you using (and is move AI allowed in it)?
    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'm using atb in my case and move AI is not allowed. I attached a Simple Move Script to the combatant prefab I'm using as my player group member as well as the patrolling npc (same combatant), and have them implement move AI. My player group member wasn't show in the field (hidden).
  • If move AI isn't allowed, the move AI will not move the combatant at all - so either your custom simple move script is doing something on its own or something else is moving the combatant.
    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 didn't attach a custom simple move script, I believe the one I attached was the script from Ork. When I create a move AI and attach it onto the combatant, Ork automatically attach a Simple Move AI Script component on the combatant which a default speed smoothing of 10 and rotation smoothing of 6. I attached it beforehand and changed the parameter. It seems that the script I attached caused my player group combatant to run around during the battle...if I don't do this, how do I change the parameter for the script component?
  • I did a quick with a similar setup (i.e. already attached script) and it worked fine here. If the move AI is blocked in battle, the move AI will stop the combatant and don't move it any further.

    I'd need a small Unity test project with your setup to check out what's going on - you can send me a download link (e.g. upload it to dropbox) to contact@orkframework.com.
    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!
  • Apparently the enemy combatant that is patrolling before the battle works fine as it's move AI get disabled during the battle, but the player group members (which is hidden on field) got problem. Since my battle is carried out in a separate scene, when my combatant member (which the script is attached) get spawned it runs around, and will only stop when I uncheck the script component.

    I'll try to solve it myself first, and if nothing comes out of it I'll send a small test project.
  • Oh, forgot to not have the members spawned in the field - yeah, now it's also happening on my end :D

    Will fix this in the next update.
    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!
  • Thanks a lot! Looking forward to the next update :)
Sign In or Register to comment.