Notes:
- If the image file has a color depth lower than 32 bits, Game Editor understands that the color of the first pixel (upper left corner) is the color that should become totally transparent in the image.
- If your image has 32 bits color depth, Game Editor will consider the alpha channel (transparency channel) of the image.
- If your image is a gif, Game Editor will consider the gif transparent color.
- If all pixels in the image have the same color (solid image) the image will be consider solid.
Hblade wrote:Theres another way to stay inside the arena. ok, what ever key moves your character, say... left, you'd say, if (x>areana.x) { x = x - 4; } this would make the character move left ONLY when he's in the arena, when he reaches the arena's X he stops moving
// global code]
int leftSeats = 60;
int ArenaXsize = 300;
int walkSpeed = 4;
StepLeft -= walkSpeed;
StepRight += walkSpeed;
// in left key press perhaps?
x += StepLeft;
// in right key press perhaps?
x += StepRight;
// in draw, likely.
x = max(leftSeats, min(x, ArenaXsize));
Bee-Ant wrote:Why dont you just type 60 instead of leftSeats?it needs a checking as well right?(its okay if there are more use of leftSeats,but in this case...)
And
stepLeft+=walkSpeed;
stepRight-=walkSpeed;
In global code doesnt make sense...
Wouldnt them to be continuesly increased or decreased?
Why didnt you put them in the keydown?
Anyway, using your method need a deep thinking (dont treat idiot like me as smart as you) and more than 4 lines of code. I think using IF is the simpler way
Well,your code suits to finishing project i think,in the starting,basic code its okay since you have a lot work to do
Users browsing this forum: No registered users and 1 guest