Advertisement
Guest User

Untitled

a guest
Dec 8th, 2015
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. --characters.lua
  2. --v1.1.2
  3. --Created by Horikawa Otane, 2015
  4.  
  5. local characters = {}
  6.  
  7. local playerCharacters = {}
  8. playerCharacters[1] = "mario"
  9. playerCharacters[2] = "luigi"
  10. playerCharacters[3] = "peach"
  11. playerCharacters[4] = "toad"
  12. playerCharacters[5] = "link"
  13.  
  14. local intIds = {}
  15. intIds["mario"] = 1
  16. intIds["luigi"] = 2
  17. intIds["peach"] = 3
  18. intIds["toad"] = 4
  19. intIds["link"] = 5
  20.  
  21. local playerCharacters = {"mario", "luigi", "peach", "toad", "link"}
  22.  
  23.  
  24. local function resetCharacter(characterId, powerupId)
  25.     loadHitboxes(characterId, powerupId, Misc.resolveFile("character_defaults\\" .. playerCharacters[characterId] .. "-" .. tostring(powerupId) .. ".ini"))
  26. end
  27.  
  28. local function loadAllHitBoxes()
  29.     for _, butts in pairs(playerCharacters) do
  30.         for i = 1, 7, 1 do
  31.             local theIniFile = Misc.resolveFile(butts .. "-" .. i .. ".ini")
  32.             if  theIniFile ~= nil then
  33.                 loadHitboxes(intIds[butts], i, theIniFile)
  34.             else
  35.                 resetCharacter(intIds[butts], i)
  36.             end
  37.         end
  38.     end
  39. end
  40.  
  41. function characters.onInitAPI()
  42.     loadAllHitBoxes()
  43. end
  44.  
  45. return characters
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement