I'm trying to set up Steam Achievements for my game. All of the things that I want to check are kept track of in the game by ork game variables (whether or not certain scenes have been done, how many times you've beaten the game, what endings you've done, etc). But I need to check them in a C# script. Can I do that and what's the correct syntax for checking them?
  • edited November 2019
    You can access global variables via ORK.Game.Variables, offering various functions to get, set or change values, e.g. getting a bool variable:

    bool value = ORK.Game.Variables.GetBool("key");
    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!
  • Awesome! Thank you!
  • Is there a list of those functions somewhere I can check out?
  • Yes, in the API - check out the variable handler here.
    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 so much!
  • Have these functions changed (for ORK 2. I'm updating an old project.) and if so can you share me a new link? My old ones appear to no longer work.
  • Due to ORK 3 being an extension for Makinom 2, some of ORK 2's functionality is now found in Makinom.

    The global variables are now found here: Maki.Game.Variables
    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 March 2022
    So instead of:
    bool value = ORK.Game.Variables.GetBool("key");

    we'd use:
    bool value = Maki.Game.Variables.GetBool("key");
    ?

    and is using ORKFramework still enough on this or is there a Makinom namespace I should include too? (and if so where can I get that data?)
    Post edited by Whatexists on
  • Yes - new namespaces are GamingIsLove.ORKFramework and also GamingIsLove.Makinom.
    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 March 2022
    and those namespaces are included in ORK 2? My visual studios isn't recognizing them. Although it is still recognizing ORKFramework as a namespace.
    Post edited by Whatexists on
  • Oh, sorry ... are you using ORK 2? I thought you where updating an ORK 2 project to ORK 3.

    For ORK 2 things are still the same:
    - namespace: ORKFramework
    - global variables: ORK.Game.Variables
    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!
  • Okay. That makes sense. The code must not be working for some other reason then.
  • Are you getting an error or is it just not doing anything?
    Maybe post your code and I can take a look at it :)
    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!
  • Sorry! I only just saw this. Thank you for the offer! The code is for steam achievements. I found why it wasn't working: it checks a variable repeatedly to make sure everything is set up properly and it's talking with steam, but there's no place in the code where it actually changed that variable. So it was exiting the code before ever calling anything from ORK.
Sign In or Register to comment.