Using the Scene editor in AppGameKit Studio and the draw mode, I painted some square sprites I made and had them snapped and fit to the grid. I assigned them all to an array group, and am trying to find a way to move them all when I press an arrow button (essentially have the world move around my centered player sprite).
What I tried: I drew a map in paint, but figured it would be more work to add collision within a png than just painting the sprites on the scene editor. I was able to move the png around like I wanted with some code similar to this (the code currently has an error that I will explain in a bit):
//Left button
if GetRawKeyPressed(37) = 1
xlevel00 = GetSpriteX(GetSpriteImageID(gameScene_world)) + 50
SetSpriteX(gameScene_world, xlevel00)
endif
explanation: When the left arrow key is pressed a variable gets the X value of the specified sprite and adds a value to shift its location.
So where "gameScene_world" is, it used to be the variable name for my full map image, gameScene_world being my new array group. The error I'm getting is this:
"setsprite" [x and y] " does not accept the parameters (Integer Array, Integer)
So I understand I cannot use an array there to identify the all the sprites at once. Is there a way I can refer to every sprite in the group without specifically referring to each sprite? I'm trying to minimize code to make it simple and readable because I know I could just go do them one by one otherwise. Thank you.