The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:40 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 26 posts ]  Go to page Previous  1, 2
[Question] Random choices 
Author Message
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Huntragon wrote:
Try this code.I think is best than x21 and evilgram,but is a bit more complicated.

Code:
Math.round(Math.random()*3+1)

That's the exact code I posted.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Tue May 05, 2009 8:35 am

Joined: Mon Aug 11, 2008 11:33 am
Posts: 22
Evilagram wrote:
Huntragon wrote:
Try this code.I think is best than x21 and evilgram,but is a bit more complicated.

Code:
Math.round(Math.random()*3+1)

That's the exact code I posted.

Its not the exact code.My code is to give a round number.Your code and x21 one its to give a number between 1 and 3,including decimals.My code will give 1,2 or 3.Yours and x21 would give 1,235432 or 2,2314141....


Wed May 06, 2009 12:22 am
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
No, if you look closely, mine had Math.random(); too. Check the edited dates, I didn't change it just now.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Wed May 06, 2009 6:28 am
User avatar

Joined: Thu Mar 05, 2009 10:49 am
Posts: 31
Thanks guys for all of your post and I have found one thing wrong with my actionscipt. It's that when I check for if something is happending I checked for a hall number not decimals and all of that. How can I check if the numbers is from say 1 to say 1.99 or the last number it can reach? I just whant to check if the random number is inside that "line" or sequence of numbers. Thanks for everything.

_________________
Image
Click the pod to go to my website.


Wed May 06, 2009 11:31 am
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
trace(yourVariable);

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Wed May 06, 2009 12:19 pm
User avatar

Joined: Thu Mar 05, 2009 10:49 am
Posts: 31
I don't really get what you just said cause isn't trace for getting an output? If you didn't get what I said I meant that I wanted to check for a variable bewteen say a number to the number right next to it that includes decimals and all of that.

_________________
Image
Click the pod to go to my website.


Thu May 07, 2009 8:20 am
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
if(myVar < 10 && myVar > 0){
//do stuff
}

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu May 07, 2009 9:19 am
User avatar

Joined: Thu Mar 05, 2009 10:49 am
Posts: 31
Thanks I'll that let's see if it works.
It didn't work but here's the zip file in case you guys need it.

_________________
Image
Click the pod to go to my website.


Thu May 07, 2009 10:22 am
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
What zip file?

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu May 07, 2009 10:59 am
User avatar

Joined: Thu Mar 05, 2009 10:49 am
Posts: 31
I don't know every time I upload an attachment it doesn't work I'll give a link else where later.

_________________
Image
Click the pod to go to my website.


Thu May 07, 2009 3:17 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Mabelma95 wrote:
I don't know every time I upload an attachment it doesn't work I'll give a link else where later.

Which is why I never trust forum upload scripts!

Try Megaupload, SendSpace, or Mediafire (preferably the latter two).

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu May 07, 2009 4:20 pm
Display posts from previous:  Sort by  
 [ 26 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.