Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. --register the mod
  2. AdamAndAppleMod = RegisterMod("Adam from Community Remix", 1)
  3.  
  4. --get the character
  5. local AdamCharacter = Isaac.GetPlayerTypeByName("Adam")
  6.  
  7. --get the item
  8. local AdamItem = Isaac.GetItemIdByName("The Apple")
  9.  
  10. --add the character to true co-op
  11. function AdamAndAppleMod:applyAdamSpritesheet(player)
  12. player:GetSprite():ReplaceSpritesheet(0,"gfx/characters/costumes/Character_Adam.png")
  13. end
  14.  
  15. local AdamTrueCoopData = {
  16. Name = "Adam",
  17. Type = AdamCharacter,
  18. SelectionGfx = "gfx/truecoop/char_portraits/Adam.png",
  19. GhostCostume = Isaac.GetCostumeIdByPath("gfx/truecoop/costumes/ghost/ghost_adam.anm2"),
  20. MaxHearts = 4,
  21. Hearts = 4,
  22. Items = {AdamItem},
  23. OnStart = AdamAndAppleMod.applyAdamSpritesheet
  24. }
  25.  
  26. local function onTrueCoopInit()
  27. InfinityTrueCoopInterface.AddCharacter(AdamTrueCoopData)
  28. InfinityTrueCoopInterface.AddCharacterToWheel("Adam")
  29. InfinityTrueCoopInterface.AssociatePlayerTypeName(AdamCharacter, "Adam")
  30. end
  31.  
  32. if InfinityTrueCoopInterface then
  33. onTrueCoopInit()
  34. else
  35. if not __infinityTrueCoop then
  36. __infinityTrueCoop = {}
  37. end
  38.  
  39. __infinityTrueCoop[#__infinityTrueCoop + 1] = onTrueCoopInit
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement