r/CodingForBeginners • • 11d 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);

}

1 Upvotes

6 comments sorted by

View all comments

2

u/xarop_pa_toss 11d ago

First: context please. What is this from? An engine like Unity or UE? A library? Something you made up?

Second: use code blocks or something like pastebin. As is, it's nigh unreadable

Third: what have you tried? What errors are you getting? Have you debugged?

Put some effort behind your posts or no one is gonna take the time to help you