edited June 13 in ORK Scripting
I'm going through scripting tutorials. I'm not a good programmer but I love to learn how to access these data through a script. I know how to get access to player combatants. But if I wanna access Combatant's MaxHP and HP status values, How can I do that?

I tried to find a solution using API documentation but it is kinda confusing. Probably because I'm missing basic knowledge. Is there any documentation about how to access these? and a guide how to use APIs?
Post edited by Malith on
  • edited June 13
    After going through few posts, I found that Combatant.Status[] is an array. Now I can understand how to access Status values. But in API documentation I can't find anything related to a Status array In Status Values. Please someone point me why is that?

    And one more question I've seen using using ORKFramework.Editor; in many posts. But when i try to use it, this namespace doesn't exists. I'm confused.
    Post edited by Malith on
  • edited June 13
    I had hard times trying to understand programming i know your feels, if i remember correctly, the way to access the status of a combatant is to first get the combatant, you have helpers, then you can do _combatant.Status[id].GetValue() for example : _combatant.Status[0].GetValue() will get the MaxHp Status Value
    You can simply use ORKFramework namespace i have never seen ORK Framework.Editor

    Edit : you can find here one of my post when i was searching how to access status values with a custom script :) : forum.orkframework.com/discussion/4591/fall-damage-script
    Post edited by Tr1nome on
  • In the API it's listed as a property in the CombatantStatus class (StatusValue this[int index][get])

    CombatantStatus (accessed via combatant.Status) is the overall class for accessing a combatant's status information (also status effects via combatant.Status.Effects), accessing it as an array gives you the individual status values.

    I haven't seen using ORKFramework.Editor anywhere, though - you'll usually only need access to the regular ORKFramework namespace. Editor should only be used if you do some custom editor scripts (e.g. for custom inspectors of your components).
    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!
  • Thank you for the kind words @Tr1nome Its kinda hard to understand scripting but at the same time its very rewarding and tempting to learn more. Now I understand little bit how this works. I'll refer your post :)
  • Thank you @gamingislove I saw using ORKFramework.Editor here. http://forum.orkframework.com/discussion/3336/resource-generating-ork-constants-for-scripting#latest
    And you are right he using it for custom editor scripts. :)
  • Ah, I see - yeah, that's an editor class, adding something to the Unity menu :)
    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.