edited May 2016 in ORK Support
As the thread title suggests, does ORK framework, out of the box without additional scripting, support controlling multiple characters in real time by selecting and clicking, similar to games such as neverwinter nights 2 or baldur's gate?

If so I will likely purchase it, since the other features seem very useful, but that is the sort of game I'd like to make so that would seal the deal.
Post edited by Z4ron on
  • The player controlled combatant can be switched during the game in different ways. E.g. through a group management menu, clicking on HUDs, input keys to cycle through the available combatants or by building other logic with the event system.

    Clicking on the combatant to use it as player can be done by using a game event that uses the Set Player step to use a game object as the new player.
    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, couple followup questions : How might I select multiple characters at once, and how might I say, order said selected characters to move to an enemy and autoattack that enemy?
  • Selecting multiple combatants (like in RTS) isn't really possible out of the box - you can probably create something like it using the event system.

    Commanding other combatants to attack a target is possible through different ways. E.g. there's the Command battle menu item that allows giving other group members commands. You can also use Group Targets for that, e.g. selecting an enemy through a click and have the battle AI of your AI controlled player group members attack the group target.
    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 probably should have clarified in my original post, I'm not really averse to scripting, I just wanted to make sure I wouldn't be inventing my own framework here. I did purchase your product and I am liking it so far.

    I was looking into your source code yesterday and I think I can accomplish what I want just by adding an isSelected variable to a combatant and then probably implementing drag select. Extracting some of your ActorEventMover code and putting it in foreach loop accomplished moving multiple characters simultaneously, so I think I am good, and I think there is an autoattack flag somewhere.
  • You probably don't even need to extract code from the ActorEventMover component - you can just use it and tell it where to move :)
    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!
  • you're right it was actually from MousePlayerController. I just did this :

    Vector3 point = Vector3.zero;
    if (this.mouseTouch.Interacted (ref point)) {
    Ray ray = Camera.main.ScreenPointToRay(point);
    RaycastOutput hit;
    RaycastHelper.Raycast (ray.origin, ray.direction, out hit, this.raycastDistance, this.layerMask);
    foreach (Combatant character in ORK.Game.ActiveGroup.GetGroup()) {
    ActorEventMover mover = ComponentHelper.Get(character.GameObject);
    float distance = Vector3.Distance(hit.point, character.GameObject.transform.position);
    mover.MoveToPosition(
    character.GameObject.transform, true, true, true, true, hit.point,
    EaseType.Linear, distance / this.runSpeed);
    }
    }


    This weekend I will add drag select and maybe some formations rather than telling everyone to move to the exact same point (add a slight offset). Not now tho gotta work during the week : ).

  • edited November 2020
    Hey Z4ron, did you ever get that drag select on multiple units to work?
    Post edited by ractre on
Sign In or Register to comment.