edited December 2014 in General Discussion
I have created a HUD to display the health, mana and stamina of the combatants. It is displayed if the bool "playersAdded" is true. Which works fine.

But when I add another item to the "Display conditions" list that checks if the string game variable "PC2Job1" is equal to "None" then it doesn't work.

Under "Variable Key" I have set the "Variable Type" to "Game Variable" and the "Value" to "PC2Job1". "IsValid" is enabled because according to this site: http://orkframework.com/howto/2013/08/20/game-variables/ that means:

"Is Valid
If enabled, the result of the check must be valid"

"Type" is set to "String" and under "String Value" the "Value" is set to "None".

Debug.Log ("PC1Job1 :" + ORK.Game.Variables.GetString("PC1Job1") + " PC2Job1: " + ORK.Game.Variables.GetString("PC2Job1"));

Thanks to that code I KNOW that "PC2Job1" has the value "None". And yet the hud is not displayed. I don't know why setting up a condition like that is so horrible unintuitive to do in ORK. I don't think that I that I know what the condition will do at any point while setting it up.

A text that takes what you have input and displays it as a readable "if-then" statement would be very helpful.

Post edited by Kashrlyyk on
  • You need to set the Variable Type to Value. See this how-to for details.

    In short, using the Game Variable value type means that you define the key of a game variable that holds the key of the actual game variable ...
    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!
  • This is what the help you get when you hover of "Value Type" says:

    "Select where the string value comes from:
    - Value: A defined value.
    - Game Variable: The value of a game variable string.
    -....."

    It doesn't say: "- Game Variable: This creates a new game variable and checks the value of it".

    I interpret that help as: Check if a Game Variable that ALREADY EXISTS has the value mentioned below! Which is clearly NOT what happens.
  • Game Variable doesn't create a new game variable, the defined value is the key of a game variable, and the value stored in it will be used.

    In context of the Variable Key settings, Value lets you define the key of the game variable you want to use, Game Variable lets you define the key of a game variable which's value you want to use.
    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.