r/CodingForBeginners • u/marspz34 • 9d ago
help with my code
im trying to make a code where 3 arrows bounce off the walls and when the colide they swithcndirection and each arrow has to have an id number on top of it like ass a text and im really strugling if anyone could help me that would be great this is what i have so far
class Arrows //definition of new custom type
PImage upLeft;
PImage downLeft;
PImage downRight;
PImage upRight;
}
void setup()
{
arrow1 = loadImage("upLeft.png");
arrow2 = loadImage("downLeft.png");
arrow3 = loadImage("downRight.png");
arrow4 = loadImage("upRight.png");
}
void draw()
{
background(250,250,250);
image (currentImage);
}
View all comments
Show parent comment
1
u/xarop_pa_toss 9d ago
Yes. That is why. Read the errors it gives you, sometimes they are kind of cryptic but if you copy paste them onto Google, you'll find the answers