|
| 01 Sep 2012 07:26 PM |
I know a random character would be: mobs[math.random(1,#mobs)]
But how would I select a random strike inside the characters?
mobs = { ["Chuck Norris"] = { ["Falcon Punch"] = { damage = 50 stamina = 100 critical = 100 } ["Roundhouse kick"] = { damage = 100 stamina = 0 critical = 100 } } ["Arnold"] = { ["Handshake"] = { damage = 60 stamina = 50 critical = 100 } } } |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 01 Sep 2012 07:36 PM |
local mob = mobs[math.random(1, #mobs)] local attack = mob[math.random(1, #mob)] local dmg = attack[math.random(1, #attack)
|
|
|
| Report Abuse |
|
|
|
| 01 Sep 2012 07:39 PM |
.___.
I mean, as you can see, the strikes are inside the mobs table. Inside characters. And their damages and others are inside the strikes.
|
|
|
| Report Abuse |
|
|