Hi,

Facing some issues when setting up my battle scene. Going to use ORK demo project to demonstrate what I wanted to achieve.

In ORK demo project,
1) In "Field" scene, there is a real time battle area.
2) In "startEvent", there are steps to join BrownPant to active group (Join Acitve Group step) and spawn a player (Spawn Player step) at SpawnPoint0.

I moved this SpawnPoint0 to inside the real time battle area. When I start from "Field" scene, I can move BrownPant around and some enemies combatant would chase my BrownPant and attack it.

However, after I changed "Spawn Player" step to "Spawn Combatant" (spawn BrownPant with Player faction) and re-start the scene, everything is frozen. I can see many enemies combatant being spawned in the scene, but they're not moving around. I.e. they're not hunting the Player faction combatant BrownPant. I tried to change Player faction to Allies, but same effects.

Therefore, want to double check whether a "Player Group" is required to get battle working?

Ultimately, I want to achieve to something like
1) I spawn two factions of combatant in a real time battle area.
2) By using proper MoveAI and/or BattleAI, they (different factions) can fight to each other automatically.

Any hints?
  • No, it's not required.

    However, if you're using any of the range settings in Battle System > Battle Settings (e.g. the Battle Range or AI Range), the range checks would fail, resulting in the combatants not doing anything :)

    So, if you don't always have a player, I'd recommend disabling those ranges. They're mainly used for performance improvements, e.g. if a far away enemy doesn't really need to do anything without the player around.
    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!
  • @gamingislove Thanks for the good hint!

    I followed your instructions to disable these range settings and finally those enemy combatants start moving around! However, I noticed that they're not in battle state (They're not holding a sword). I tried using "Start Battle" node, but no luck. Do you have any idea on top of you head?
  • Hm, I've never really tested such a setup without a player, so it's possible that this is currently not working. Also, the Start Battle node is only for arena battles (i.e. using the Battle component), not for real time area battles.
    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 August 2019
    Okay, here is where I got to

    I think "Player" (or an active group) is required in a battle.

    I tried to setup a BattleComponent with auto-start in real time battle; it will spawn two enemies combatants. I attached a start event which has a node to join one combatant into an active group, but never spawn it. When I hit play, BattleComponent will spawn two enemies combatants as expected AND it will also spawn the active group combatant (even though there is no obvious action tell it to do that) and these combatants start fighting when met each other.

    If I removed the node to join combatant to an active group from the start event, then this BattleComponent wouldn't do anything; i.e. no enemies combatants spawned and of course no active group combatant spawned.

    If I simply spawn two factions of combatants in the BattleComponent but still no active group; then these two factions of combatants will be spawned, but they won't fight, i.e. they're not in battle state.
    Post edited by ljx00_520 on
  • I'll do some tests and see if I can make it work without any player around for the next update. Will take some time, though, currently working on something else :)
    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.