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.

Code Snippets / [LOCKED] Random

Author
Message
Rennekon
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 22nd Dec 2003 02:24
I'm making a breakout game and I want random powerups to fall when a block is broken. Is there some code to that will make a random event?

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 22nd Dec 2003 02:37
Use the rnd() command like this: rnd(value)

It will make a random number from 0 to that value. Be sure to use randomize timet() at the start of your program to resead the randomizer.

"All programmers are playwrites and all computers are lousy actors" -Anon
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 22nd Dec 2003 16:48
just a question

HOW COME THIS ESCAPED THE EYES OF THE MOD'S WITH IT BEING A QUESTION?

just wondered!

Resist the power of the ring...
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Dec 2003 17:20
Didnt see it at first.

CODE SNIPPETS ONLY.

Locked.

RPGamer


Dont forget to Join the Forums!

Login to post a reply

Server time is: 2024-11-24 00:01:50
Your offset time is: 2024-11-24 00:01:50