123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|425|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Making Block?

Mon, 10 Sep 2007, 12:18
Hotshot
Hiya there,

What I am trying to do is making some block by using the mouse Put whatever block positions or size of the block.

for example If I made small block then I move them in the middle and if I make another block then I put it somewhere(like right or left or top or bottom).
But at the moment...I only got one block....how do you make muti blocks?


Mon, 10 Sep 2007, 12:45
JL235
First I don't know what you mean. This is kinda a guess, but I'd like to ask you to explain again or further. Maybe draw an example of what you want to achieve.

Second, i will eventually increment greater then the size of the array and you'll (hopefully) get an array index out of bounds (although I'm finding here it's only caught in the debugger which is a HUGE flaw). So you should check if the size is valid (but arrays can't store their size so it's up to you to do this code).

Third, is something like this what your after?

Mon, 10 Sep 2007, 13:33
JL235
Or do you mean something like:


Also I didn't realise until I wrote the above code. Blitz doesn't do short-circuiting. If you changed the if statement above to:

It no longer works because it runs the 'isValidRectangle' function if it's null, which it shouldn't. I cannot think of another language which doesn't allow short-circuiting.
Mon, 10 Sep 2007, 13:34
Hotshot
Yeah that it (the first one and I going check out the seconds one that u have post it) Diablos devil

It is possible to show picture on here of what I am trying to do?

what the link for uploading the pic?

cheers

Mon, 10 Sep 2007, 13:44
Hotshot
Second one is very good but I try change the colors so I can see line when I drag the mouse down (when become square)....do u know what i mean?

Like in Blitz 3D they have curors flashing as u know where is. When I move the mouse then when I want to click the mouse the square line is ready then I want drag it and it should show flashing rect then once I am happy it then I let my mouse button off then I go create another square or rectangle one...

Mon, 10 Sep 2007, 14:07
Forklift_Fred
You can use free image hosts like https://ImageShack.us or https://PaintedOver.com to post your pic here.

ImageShack is widely used but can be slow. Both will give you a thumbnail and code to paste here. With ImageShack it is the second code, with PaintedOver it's the first.

Wherever you host it, you'll need the code with [img]... rather than [img=...]

Here's a random demonstration:



gives the following result:



Not sure how to do the flashing rectangle in 3D though.

-=-=-
Come rain or shine...
Mon, 10 Sep 2007, 14:51
Hotshot
img208.imageshack.us/my.php?image=blockun3.png

the flashing rect(on when I am draging the mouse on what size I want then once I am happy with it then I let the mouse button off) then create it.

Hope that should explain
Wed, 12 Sep 2007, 16:04
Teasy
Version 1: single click twice



Version 2: click & drag



Tue, 25 Sep 2007, 06:05
Hotshot
cheers vampire and everyone LOL