Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 18 Jan 2012 04:38 PM |
| Is it possible to use probabilities in RBX.Lua? If yes, please give me an example. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 18 Jan 2012 04:53 PM |
| Can you give us an example of where you would use one? :o |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2012 04:53 PM |
That's quite vague, please explain.
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Jan 2012 04:54 PM |
I don't see how probability calculation is very useful in ROBLOX, but you just use it like normal math :P
~Would you like some butter with that latetoast? |
|
|
| Report Abuse |
|
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 19 Jan 2012 12:07 PM |
Probability is used to be described an attitude of mind towards of some proposition of whose truth we are not certain.
Is it possible if I can use the probability scale?
0% (impossible) 25% (unlikely) 50% (even chance) 75% (likely) 100% (certain)
It's really really hard to explain. I hope blockoo and crazyman32 understands.
|
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
| |
|
|
| 19 Jan 2012 12:29 PM |
you could use it as a drop chance in RPG game or something like that
dropchance=100
math.random(1,drop chance/100)
something like that ..too hungry to think right now :P |
|
|
| Report Abuse |
|
|
ownage94
|
  |
| Joined: 11 Dec 2008 |
| Total Posts: 375 |
|
|
| 19 Jan 2012 12:34 PM |
| You could use statistical algorithms to do this... i was never any good at statistics though, hold on a sec, ill try and find the one. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2012 02:42 PM |
probability = 100 -- 100% math.random(0+probability,100)
that? |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2012 02:46 PM |
So you're asking is it possible to get a percentage in RBX.Lua?
It's not easy being cheesy. |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2012 10:21 AM |
yea then you can use litozinnamon code as a drop chance and add these
if chance=1 then local d=drop:clone() d.Parent=game.Players[humanoid:findFirstChild("creator").Value].BackPack end
something like that if its an rpg game or so. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 20 Jan 2012 02:04 PM |
Thanks. All I need to know is just infomation to enchance my scripting skill. Thanks by the way.
@Ownage
When you going to show it? |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 20 Jan 2012 02:11 PM |
Probabilities aren't ONLY about Percentages. It's about what's the chance of getting it. (Bad grammar Lolz)
Example:
If I tossed a coin. What is the probability of getting heads?
Anwser: 1/2 because there are two types. (heads n' tails)
P(1 head) = 1/2
But if I tossed 2 coins and you want to know the probability of getting heads.
P(2 head) = 1/4
TROLOLOLOLOLOLO! |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2012 02:14 PM |
| According to what I read about the poker player's fallacy, chances are the same regardless of how many times they are 'stacked', so if you get head, chances of getting another head are not 1/4, but the same 1/2, but yes, if you do take the chances of getting all the heads in a row BEFORE tossing the first coin, it should logically be 1/4. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2012 12:57 AM |
you shouldn't use math.random() btw you should add tick() I don't remember how you join them up but you should find it in the wiki |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2012 03:00 AM |
| math.randomseed(tick()) ... |
|
|
| Report Abuse |
|
|
| |
|
Apocalyps
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 816 |
|
|
| 21 Jan 2012 06:32 AM |
I think this is what you mean:
http://en.wikipedia.org/wiki/Fuzzy_logic |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 21 Jan 2012 02:35 PM |
@Apocalyps
It looks really similar to me. Thanks. Are there any more ways? |
|
|
| Report Abuse |
|
|