edited July 2014 in ORK Support
I created six combatants named Player 1, Player 2 and so on. I added them to a "Combatant Group" and then spawn them with the "Join Active Group" check box "Use Combatant Group".

It then spawns 6 "Brown Pants(Clone)" objects. One has the "Button Controller" the other 5 have the "Move AI" script which is set to "Follow Leader". They don't. They don't move at all.

So how can I make sure that all 6 "Brown Pants" are always at the same location?
  • In the Move AI you're using, enable the Add Component setting.

    The move AI only handles selecting/setting targets to move to - the actual movement has to be done in a separate component. ORK Framework comes with a simple default movement script for that, but also supports Navmesh and custom components.
    What component is used is defined in the move AI - also if ORK should add it for you :)
    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, I've added the component and now they move but despite me setting "Follow Range" to zero and "No combatant radius" is checked (actually I have set EVERY range and interval to zero and checked all "No radius" things in the move AI) and still they are not right where the group leader is. They should have the same position as the group leader at every frame.
  • You want them inside of the group leader's mesh?
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • There is no mesh for the player party combatants at all since it is a first person "blob" game, like Wizardry or Might and Magic or Lands of Lore.
  • If they should have the same position as the leader anyway, why not mount them to the player directly?
    You could do this with an autostart event aded to the game objects of your members - simply use the event object and the player as actors and mount one on the other :)
    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 2014
    Please, look up "Curse of Knowledge". There is an article about it on wikipedia.

    In the "Event Settings" I have set "Actor" to "Object" and checked "Event Object". In the "Mount Object" step I have under "Object" "Object" set to "Actor" and "Actor" set to "0: Event Object" and I checked "Mount".

    Under "Target Object" I have to select "Prefab" instead of "Actor", right?
    Post edited by Kashrlyyk on
  • If you've gone through the game tutorials to learn using ORK Framework (which I really recommend), you should already know the concept of actors.

    You need two actors in that event:
    - the event object (type Object and enable Event Object)
    - the player (type Player)

    In the Mount Object step, enable Mount, select the Actor event object for the object to mount and the Actor player as the target object.
    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 2014
    Thanks, done that and added it to the player prefab and it works.

    Also no move AI needed anymore. Just in case someone else also wonders why they are suddenly moving without pressing any buttons.
    Post edited by Kashrlyyk on
  • edited September 2014
    Another Problem: When I start the game it loads the "Character Creation Scene" and all 6 game objects are there and 5 of them are children of the party leader. So everything's fine. But when I load the next scene after the "Character Creation Scene" only the party leader game object is there.

    That is problematic if you have object variables. Because this code "Debug.Log (ORK.Game.Scene.GetObjectVariables("fe5bd33d-e117-4332-837d-bbdba306a26f").GetString("UsedWeapon"));" returns nothing. There is no error message just this:



    UnityEngine.Debug:Log(Object)
    InventoryDisplay:Update() (at Assets/Scripts/CharacterMechanic/InventoryDisplay.cs:1376)


    There should have been an "empty" before "Unity.Engine.Debug:Lob(Object)" instead of an empty line. In the "Character Creation Scene" you get that string.

    I use a "Scene Changer" to go from the "Character Creation Scene" to the "Level 1" scene.
    Post edited by Kashrlyyk on
  • edited September 2014
    Did a quick test, as long as your setup is like this, it should work:
    - mount event on your group member prefabs with start type Autostart
    - Spawn Group enabled in the game settings
    - they all must be part of the battle group, or they wont be spawned

    If no value is displayed for a string variable, it's either:
    - not set
    - set to an empty string

    With object variables, it also could be that:
    - the object ID is wrong
    - there are no variables for that object ID
    Post edited by gamingislove on
    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.