edited June 2022 in ORK Scripting
I have been trying a few different lines of code in ORK2 like:
ORK.Game.ActiveGroup.JoinBattle(combatant);
combatant.SetGroup(new Group(0));
playerGroup.Join(combatant, true, true);.

While these lines allow the group of the combatant to change it also changes its Inbattle to false. I did try just changing the Inbattle to true after, but it causes the combatants to break. So I was just wondering if there was a way to script this.
Post edited by Kuzuma117 on
  • Try using afterwards:
    ORK.Battle.Join(combatant);

    Leaving a group also leaves the group's battle group, which causes the combatant to be removed from battle.
    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!
  • Is there any way for me to change a combatant's group and have them rejoin the battle without spawning a new instance of this combatant, or changing its position when I use ORK.Battle.Join(combatant);.

    Currently when I use ORK.Battle.Join(combatant); the combatant changes its position on the screen and I would like it to remain on the same transform. Additionally, it seems like the combatant is moving to a random position (although it is always the same spot, so not so random) however I don't have any spawn points where the combatant is appearing. Is there any way to dictate where ORK.Battle.Join(combatant); places the combatant?

  • Unless it's a real time area battle, the combatant will get a new battle spot to be placed at.

    However, you can animate that using the Join Battle Animation (battle event) - default is set up in Battle System > Battle Settings > Combatant Settings > Battle Animations, each combatant can optionally override it with custom events.

    In the battle event used here, you can e.g. move the combatant to the new position or set the battle spot's position to the combatant's current position. The battle spot is available as Waypoint object (instead of Actor) and User Base waypoint.
    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.