123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|691|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Cobra -> Vertical bar effect

Sun, 20 Apr 2008, 17:28
Hotshot
why it isnt working




Sun, 20 Apr 2008, 18:01
flying_cucco
Its not showing *anything* because you are drawing everything in black. Not sure what it is *supposed* to look like. Lets look at the first bit


Several times you pick this colour

but Rand(0) is always 0, hence it is black. If you want any colour, try

Rand(255) will choose anything from 0 to 255, which is the full range of colour component values.

But I think maybe you want to get a gradient effect. Try taking out PenColor() command, as it doesn't work on Rect() -- rect specifies its own colour as an argument. Replace the random color in your Rect() commands with the colour from your PenColor() command


also, you want the Rect()s to draw on the bar image? So, add bar as the last argument, which specifies which image (or the screen) to draw to.

So it looks like this


|edit| Oh, now there's a picture! Can you post/point to the original code?
Sun, 20 Apr 2008, 18:09
flying_cucco
In cobra, you must set the target image in each command. I had to guess where the blitz SetBuffer ImageBuffer() commands were. Check the img and bar arguments added to the Rect() and DrawImage() commands.

Colour is set in the command too. Check ToRGBA() arguments in the Rect() commands

Finally I added a bit (commented below) to scroll the last line up, to make it look like the image you posted. I hope I guessed right


Sun, 20 Apr 2008, 19:01
Hotshot
whoa Excellent flying_cucco
thank you very much

Cobra Version Screenshot