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 / randomizing time

Author
Message
programmer ML
19
Years of Service
User Offline
Joined: 1st Jun 2005
Location:
Posted: 18th Feb 2006 18:11
I have some pictures falling from the top of the screen but i want them to fall at random times and have like 2 or 3 on the screen at one time. How can I do this? thanks.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Feb 2006 23:31
You can make an array that holds all the information you need for each graphic.

This code snip creates 20 boxes that fall at different rates using the "timer()" command:




Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 18th Feb 2006 23:38 Edited at: 18th Feb 2006 23:42
Okay, here's some... pretty basic code. It isn't very good, it's just how I would do it. But just for your information, you were very unspecific on your question. I don't know exactly waht you need. also normally you don't just ask for code. Try it first, then give us your code, then we fix it for you. Here's just something that will make dots fall down the screen. If you need something different, just ask.

(An array would be better, but this one is extreamly easy.




LIGHT FRENZY (almost done!)
Best Noobish game ever.
Chilled Programmer 420
18
Years of Service
User Offline
Joined: 24th Nov 2005
Location: NOT SAYING!, i dont wanna get kidnapped!
Posted: 21st Feb 2006 22:02
y r u using real values for varibles flameing? use integers for whole numbers because they use less memory and are faster

[url=www.freewebs.com/tyhrfg][img]bruce.bmp[/img][/url]

Login to post a reply

Server time is: 2024-09-24 17:35:13
Your offset time is: 2024-09-24 17:35:13