Skip to main content

Global Variables/commands

Comments

3 comments

  • Moderator Beacon of Knowledge Super Star

    Hello! As far as I know, all variables function globally in MakeCode. I will check to double-check it.

    In Python Azure Notebook, there are scope and other features, and variables can be given global scope.

    0
  • Dongmei S

    Correction, a variable that is global among all players?

    0
  • Moderator Beacon of Knowledge Super Star

    Ahhh. There's the rub!

    Communication between players is a challenge in ANY of the coding languages.

    I just finished a fun Python implementation of a simple random array. However, if you want a player *other* than the coder to interact with the code, you have to get really creative. I had to use an NPC and blocks placed in the world to make this work. But alas, I have requested global variable slots, myself, but there are none.

    0

Please sign in to leave a comment.