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?
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 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
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 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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?
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Also no move AI needed anymore. Just in case someone else also wonders why they are suddenly moving without pressing any buttons.
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.
- 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
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!