What is happening? (Sprite sheet)

PVector pos = new PVector(650, 0);
PVector vel = new PVector(0,0);
PVector acc = new PVector(0,9.8);

//import gifAnimation.*;
//Gif Sprite;

//import processing.sound.*;
//SoundFile file;
//PImage Background;
PImage Walking;
PImage cutWalking = new PImage[6];
color c = color(0);
int frameWalking = 0;
int xcoordWalking = Walking.width/6;
int ycoordWalking = Walking.height;

void setup() {
fullScreen();
background(c);
noStroke();
fill(c);

Walking = loadImage(“Walking-Animation.png”);
for (int i=0; i<6; i++) {
cutWalking[i] = Walking.get( i * xcoordWalking, 0,xcoordWalking, ycoordWalking);
}
//Sprite = new Gif(this, “skye-mcclure-walkingperson.gif”);
//Background = loadImage(“House.png”);
//Loads a file from the /data folder of the sketch and plays it back.
//SoundFile file = new SoundFile(this, “Monkeys-Spinning-Monkeys.WAV”);
//file.play();
}

void draw() {
display();
//image(Background, 0, 0);
image(cutWalking[frameWalking], pos.x, pos.y);
}
//image(cut, pos.x, pos.y);
//image(Sprite, pos.x, pos.y);

void display() {
background(c);
move();
}
//This is the beginning of the next tab

1 Like

(post deleted by author)

1 Like

it’s best to post a runable version, so post all tabs in one go please.

Also upload your sprite sheet here (use the button with the landscape)

Remark

This line
PImage cutWalking = new PImage[6];
must be
PImage[] cutWalking = new PImage[6];
because cutWalking is seen as an array

1 Like

Hello @FelixBrooks,

Please read these:

:)