School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,144 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,740 people online right now. Registration is fast and FREE... Join Now!




how to make random selection in game maker

 

how to make random selection in game maker, need how to do

peijian88

15 Oct, 2009 - 04:51 AM
Post #1

New D.I.C Head
*

Joined: 15 Oct, 2009
Posts: 3



Thanked: 1 times
My Contributions
how to make coding for random selection?

User is offlineProfile CardPM
+Quote Post


Aeternalis

RE: How To Make Random Selection In Game Maker

15 Oct, 2009 - 05:06 AM
Post #2

D.I.C Regular
***

Joined: 13 Jul, 2009
Posts: 273



Thanked: 25 times
My Contributions
QUOTE(peijian88 @ 15 Oct, 2009 - 04:51 AM) *

how to make coding for random selection?


Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.


Thank you for helping us helping you.

Aet



This post has been edited by Aeternalis: 15 Oct, 2009 - 05:09 AM
User is offlineProfile CardPM
+Quote Post

peijian88

RE: How To Make Random Selection In Game Maker

15 Oct, 2009 - 05:17 AM
Post #3

New D.I.C Head
*

Joined: 15 Oct, 2009
Posts: 3



Thanked: 1 times
My Contributions
QUOTE(peijian88 @ 15 Oct, 2009 - 04:51 AM) *

how to make coding for random selection?

not me dont want write the code....i dont know how to write and writte at where?

User is offlineProfile CardPM
+Quote Post

peijian88

RE: How To Make Random Selection In Game Maker

15 Oct, 2009 - 05:33 AM
Post #4

New D.I.C Head
*

Joined: 15 Oct, 2009
Posts: 3



Thanked: 1 times
My Contributions
QUOTE(Aeternalis @ 15 Oct, 2009 - 05:06 AM) *

QUOTE(peijian88 @ 15 Oct, 2009 - 04:51 AM) *

how to make coding for random selection?


Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.


Thank you for helping us helping you.

Aet

not me dont want write....is i dont know how to write the code...

QUOTE(peijian88 @ 15 Oct, 2009 - 04:51 AM) *

how to make coding for random selection?


not me dont want to write...is i dont know how to write..

User is offlineProfile CardPM
+Quote Post

e_barroga

RE: How To Make Random Selection In Game Maker

16 Oct, 2009 - 05:47 PM
Post #5

D.I.C Regular
Group Icon

Joined: 16 Feb, 2009
Posts: 435



Thanked: 24 times
Dream Kudos: 825
My Contributions
The simplest way to achieve this is by using the choose(...) function in Game Maker 7.

CODE

var i;

i = choose(1, 2, 3, 4, 5);

switch (choose)
{
    case 1:
        ...
    break;

    case 2:
        ...
    break;

    ...
}

User is offlineProfile CardPM
+Quote Post

Sinnner

RE: How To Make Random Selection In Game Maker

18 Oct, 2009 - 07:21 AM
Post #6

D.I.C Head
**

Joined: 24 Jul, 2009
Posts: 171



Thanked: 2 times
My Contributions
Wow, that's my area of expertise!IPB Image But I'm not sure what you mean? You mean choosing destroy_object(random)? That's not code o.O. Just wanted to know what you mean! And GMC is better for GM related questions
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:37PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month