Hi all

Away from ORK, I'm try to catch some enemy with my trap.

After i catch some random count of that prefabs , i want to use ORK to make them in enemy group with a turnbased battel.

I know that its not a good way to do that via script , but i take about 3 month to make my game , and now i want to use ORK in my Battle , how can i do that via script ? I need all detail to do that becuse i'm new in ORK ;/
  • See this how-to for details on creating groups and combatants from script.

    Once you have a group, you can add it to a Battle component and start the battle using this code:

    BattleComponent battle = gameObject.GetComponent<BattleComponent>();
    battle.StartGroup(group, null);


    The gameObject is naturally the game object you've added the Battle component.
    The group is your initialized Group.
    The null argument can be repaced by a class instance implementing the IEventStarter interface, it'll get notified when the battle ends.
    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 GIL , i will try your soluation.
  • I check How-to link , it's talking about creating new combatants , but i need to make my prefabs gameobject in the game ( it's dont have combtants yet) to join the group via script.
    Can i make my own enemy ( example 3 bird ) already in scens to join battle ? And how can i add combatants to it ?
  • There's the Add Combatant component for that. Also, when creating them by script, you can also use your game object in the scene to be the combatant's game object:

    combatant.GameObject = yourGameObject;

    The how-to also explains about creating groups and joining combatants to them (if they're already created).
    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 mr gil

    its work now :)

    dont go away ;)
Sign In or Register to comment.