Hello. I need help with setting an area of pixels in an if statement. I am still kind of new here so please don’t pay attention to any wrong terminology I use.
In an if statement I need to use not only the one position as an argument, but an area of pixels and I don’t know how to do it. I will try to use the example of what I have in my mind below and use // where I don’t understand how to do the thing.
if(xpos == //area from pixels (0,5) to (15,5)){
xspeed*=-1
}
This is just a random example but I am having troubles of setting that area in a code, so I would appreciate some help if you have time