Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / I cant get this to work can someone show me what i'm doing wrong

Author
Message
Shadow666
17
Years of Service
User Offline
Joined: 29th Jan 2007
Location:
Posted: 27th Feb 2007 22:29
Ok what I am trying to do is when the ball moves around and hits the blocks they disappear after all the blocks have left they will be redrawn to new locations and then you would have to do the same thing over again. so far I can get the first set of blocks to disappear but as soon as I hit a block it moves the blocks to their new locations.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Feb 2007 12:43
Use an array to store whether or not a block has been hit.

Set all the elements of the array to 1 at the start and as blocks are hit, set the respective element to 0.

In a procedure, a For..Next loop can add the contents of all the elements in the array and if the total is 0 (zero) then all blocks are gone.

At this point, re-create the blocks in their new positions, set the array elements all back to 1 and start again.

This would be much, much easier to do if your program was laid out correctly using procedural methods. Check out tutorial 2 here:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=7

TDK_Man

Login to post a reply

Server time is: 2024-11-26 00:44:25
Your offset time is: 2024-11-26 00:44:25