I have an issue with character creation, already have a scene set up and variables in place and already have a way to record and store variables needed for a combatant into the script/editor (variables and ability names in script and prefab in editor), but i am having an issue moving this variables into ORK/Makinom combatant so that the created character will be used as the player in the game. Asked for help on discord and was told to ask GIL. please help.
  • edited June 20
    Depends on what the variables are for - actual variables (in ORK/Makinom context) or some status information (status values, class, ability stuff, etc.)?

    Generally, you can access ORK's player group via ORK.Game.ActiveGroup - the player is the leader, so once a player combatant is added you can access the leader via ORK.Game.ActiveGroup.Leader. The group has multiple functions to get group members (or the whole group) or join a newly created combatant to it.

    The combatant itself has also functionality to do status changes, e.g. initializing a status value to some value:
    combatant.Status[index].InitValue(value);
    combatant is a Combatant instance (e.g. the group leader or a member), index is the ID/index of the status value and value naturally the value.

    For more information, e.g. creating a combatant via scripting, check out this documentation.
    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!
  • What i need is to do a general character creation for example, i need to add a prefab to the player character and set some initial values for it to be used in the game. I can see that you suggested the combatant.Status[index].InitValue(value), but could you also help me with adding a prefab and will this value change spawn an instance of a character that or will it change the value in ORK so that i can save the game with this changes in mind?
  • You can't change the settings of the combatant - at least not making them stick through savegames.
    If you want to have different prefabs, either use separate combatants with prefab setups or use conditional prefabs, e.g. checking for status conditions or object variables on the combatant.

    A more complex solution would be to use custom component save data and handle this via scripts on your combatant's game 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!
Sign In or Register to comment.