|
| 06 Aug 2013 07:15 PM |
["Charmander"] = { ["Type"] = "Fire", ["Evolve"] = true, ["Evolvelvl"] = 16, ["EvolvePOK"] ="Charmeleon",
^^^^^ thats just an example of a pokemon
if "Evolve" = true then find()"Evolvelvl" = then find() "EvolvePOK" =
im not a very good scripter and im not sure how to word that. i want if someone gets to the "evolvelvl" then there pokemon gets replaced with the "EvolvePOK" please help |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 07:17 PM |
local pokemon={ ['Charmander']={ Type='fire'; Evlove=true; ['EvolveLvl']=16; EvolvePOK='Charmeleon } }
if pokemon.Charmander.Evolve and pokemon.Charmander.EvolveLvl==16 then
|
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:45 PM |
any other ways i can do it?
|
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 07:48 PM |
you can use brackets and quotes/apostrophes or a period to navigate through tables of tables
what are you looking for? |
|
|
| Report Abuse |
|
|
Aeropiama
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 897 |
|
|
| 06 Aug 2013 07:50 PM |
| I'm not exactly sure what you're trying to do there. Are you trying to make a table storing information for that specific Pokemon? If so, you've got the syntax off by quite a bit. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 07:57 PM |
I am trying to connect the pokemon together to where when one reaches the evolve level, it gets replaced by the next evolution 1 level higher. like
["Charmander"] = { ["Type"] = "Fire", ["Evolve"] = true, ["Evolvelvl"] = 16, ["EvolvePOK"] ="Charmeleon", ["Number"] =004, ["Ability"] ="When Charmander's HP Gets Low, It's Fire type attack's power is multiplied by 1.5", ["MalePercent"] =87.5/100, ["FemalePercent"] =12.5/100
Being connected to
["Charmeleon"] = { ["Type"] = "Fire", ["Evolve"] = true, ["Evolvelvl"] = 36, ["EvolvePOK"] ="Charzard", ["Number"] =005, ["Ability"] ="When Charmeleon's HP Gets Low, It's Fire type attack's power is multiplied by 1.5", ["MalePercent"] =87.5/100, ["FemalePercent"] =12.5/100 |
|
|
| Report Abuse |
|
|
Aeropiama
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 897 |
|
| |
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 06 Aug 2013 08:01 PM |
Rather than setting EvolvePOK to a stringvalue, make it the table of the evolving pokemon
['EvolvePOK']=pokemon['Charmeleon']
idk what you're saying, chances are you're overcomplicating things |
|
|
| Report Abuse |
|
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 06 Aug 2013 08:04 PM |
| Personally, I would store all that data in explorer, howewer unefficient it may be. I would probably store it in Lighting, because it is the classic storage area. |
|
|
| Report Abuse |
|
|
Aeropiama
|
  |
| Joined: 21 Jul 2013 |
| Total Posts: 897 |
|
|
| 06 Aug 2013 08:11 PM |
Well I don't know how you're setting your game up but you should be able to see what I'm getting at.
charmander = {"Fire", true, 16, "Charmeleon", 004, "When Charmander's HP gets low, its Fire type attack power is multiplied by 1.5", 87.5/100, 12.5/100} charmeleon = {"Fire", true, 36, "Charizard", 005, "When Charmelion's HP gets low, its Fire type attack power is multiplied by 1.5", 87.5/100, 12.5/100}
while true do if level >= charmander[3] then charmanderPokemon = charmeleonPokemon end end |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2013 09:02 PM |
would this work?
Charmander = { ["Type"] = "Fire", ["Evolve"] = true, ["Evolvelvl"] = 16, ["EvolvePOK"] ="Charmeleon", ["Number"] =004, ["Ability"] ="When Charmander's HP Gets Low, It's Fire type attack's power is multiplied by 1.5", ["MalePercent"] =87.5/100, ["FemalePercent"] =12.5/100
while true do if 16 <= level then Charmander = Charmeleon end end |
|
|
| Report Abuse |
|
|