Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --register the mod
- AdamAndAppleMod = RegisterMod("Adam from Community Remix", 1)
- --get the character
- local AdamCharacter = Isaac.GetPlayerTypeByName("Adam")
- --get the item
- local AdamItem = Isaac.GetItemIdByName("The Apple")
- --add the character to true co-op
- function AdamAndAppleMod:applyAdamSpritesheet(player)
- player:GetSprite():ReplaceSpritesheet(0,"gfx/characters/costumes/Character_Adam.png")
- end
- local AdamTrueCoopData = {
- Name = "Adam",
- Type = AdamCharacter,
- SelectionGfx = "gfx/truecoop/char_portraits/Adam.png",
- GhostCostume = Isaac.GetCostumeIdByPath("gfx/truecoop/costumes/ghost/ghost_adam.anm2"),
- MaxHearts = 4,
- Hearts = 4,
- Items = {AdamItem},
- OnStart = AdamAndAppleMod.applyAdamSpritesheet
- }
- local function onTrueCoopInit()
- InfinityTrueCoopInterface.AddCharacter(AdamTrueCoopData)
- InfinityTrueCoopInterface.AddCharacterToWheel("Adam")
- InfinityTrueCoopInterface.AssociatePlayerTypeName(AdamCharacter, "Adam")
- end
- if InfinityTrueCoopInterface then
- onTrueCoopInit()
- else
- if not __infinityTrueCoop then
- __infinityTrueCoop = {}
- end
- __infinityTrueCoop[#__infinityTrueCoop + 1] = onTrueCoopInit
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement