craigman1211's Forum Posts

  • 5 posts
  • Can I use dictionary text string to call a global variable? Cause the resources are all global variables.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Never used dictionary, now sure how that will work.

  • I tried your solution and I don't think it works for my game. The issue is that I want to be able to have the global variable tell the formula which resource is being used. This way when it does upgrade I Can change what resources it needs to get to the next level.

    When the building levels it is going to change what resource and quantity is required for next level, so right now "UpgradeResource" is set to wood, but next level it will be turned into say, water. So I really need to figure out a way that when the compare variable reads "UpgradeResource" it actually points to the "Wood" Global variable.

  • I will try this, thanks.

  • I am trying to make it so that when you have the resources available to buy a building, that a "!" becomes visible over the build icon. To do this I have a few global variable, but the issue that I am having is that the text variable will not reference the numeric variable.

    Here is my example.

    Global Variable

    Wood (#)

    UpgradeQuantity (#)

    UpgradeResource (TEXT)

    My code goes like this

    Wood=1

    UpgradeQuantity=1

    UpgradeResource=Wood

    Everytick

    UpgradeQuantity <= UpgradeResource Set "!" to visible

    How to I make it so that when it reads "UpgradeResource" that it see's "Wood" and then references the Wood Variable?

  • 5 posts