Creating lists in game lab

I’m a newbie CS teacher using the game design unit with my 8th graders. One student is making his game and wants to know if he can use lists to call for different characters to use in the game. He said he found documentation on it in code.org but it only refers to the html in unit 2. Can anyone point me in the right direction on something that could help him?? Clearly I cannot!

Hi @GordonBrune,

Here are a few resources:

  • This resource outlines how to create an array in GameLab and at the bottom of this post is an example of how you might create sprites using an array. It is a discussion from CS Principles so beyond the scope of CS Discoveries. I believe this method creates multiple sprites with the same animation/sprite.
  • Similar but probably a bit easier is using a group. This topic shows a method for setting different animations.

Hope these are helpful in getting you started.
~Michelle

1 Like

Thanks so much! I will pass the links on to him.