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 / please help with particles and mouse implementation...

Author
Message
Big Drip681
19
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 20th Feb 2005 05:09
I am writing a very simple program even simpler than breakout. It features a rotating textured box and when you click on the box, it explodes. I have the rotating box but I can't get the mouse to do anything, nor can I get particles to work. What am I missing? Please help... Since for some reason my code isn't being posted I am posting it down below...


REM Project: An exploding box...
REM Created: 2/19/2005 12:08:21 PM
REM
REM ***** Main Source File *****
REM

CLS

LOAD IMAGE "Media\escher.bmp",1
LOAD IMAGE "Media\escher2.jpg",1
MAKE OBJECT CUBE 1,1

TEXTURE OBJECT 1,1

DO
SCROLL OBJECT TEXTURE 1,2,2
ZROTATE OBJECT 1,OBJECT ANGLE Z(1)+0.1
XROTATE OBJECT 1,OBJECT ANGLE X(1)+0.1
YROTATE OBJECT 1,OBJECT ANGLE Y(1)+0.1
LOOP



DO
IF MOUSECLICK() THEN DELETE OBJECT 1
MAKE FIRE PARTICLES 1,1,4,10,10,10,10,10,10
SET PARTICLE LIFE 1,100
LOOP

WAIT KEY
TravisP
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location: Behind you, with a knife!
Posted: 20th Feb 2005 07:15
DO-LOOPS will loop forever(unless you use an end to stop it)
This means the first DO-LOOP will repeat without going to the second. Just put them both in one DO-LOOP and it should work.

Note: The above I didn't say, your just crazy.

Not a ripoff of The Twilight Zone
Big Drip681
19
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 21st Feb 2005 06:59
Well, at least the mouse does something now... it crashes and gives me an error message LOL! it tells me that the object/particle already exists at line whatever... grrrr...
This is my new code:

Login to post a reply

Server time is: 2024-09-23 12:20:31
Your offset time is: 2024-09-23 12:20:31