Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Mod = RegisterMod("your mod name", 1)
- local game = Game()
- TrinketType.TRINKET_YOUR_OWN = Isaac.GetTrinketIdByName("Your Trinket") -- trinket
- Mod.COSTUME_YOUR_COSTUME = Isaac.GetCostumeIdByPath("gfx/characters/your_costume.anm2") -- costume
- -- Option 1 assign the costume for your trinket at the very start of the game. It also works when you restart the game.
- function Mod:onNewStart(bool)
- if bool == false -- triggers on the start of a complete new game
- and CTC_API ~= nil then -- check if the 'Trinket Costume' mod is active
- -- CTC_API:MakeTrinketAvailable(trinketID, costume path)
- CTC_API:MakeTrinketAvailable(TrinketType.TRINKET_YOUR_OWN, "gfx/characters/your_costume.anm2")
- end
- end
- Mod:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, Mod.onNewStart)
- -- Option 2 assign the costume for your trinket at the first frame of the game. Also works upon restart.
- function Mod:onModUpdate(player)
- if game:GetFrameCount() == 1
- and CTC_API ~= nil then
- -- CTC_API:MakeTrinketAvailable(trinketID, costume path)
- CTC_API:MakeTrinketAvailable(TrinketType.TRINKET_YOUR_OWN, "gfx/characters/your_costume.anm2")
- end
- end
- Mod:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, Mod.onModUpdate)
Advertisement
Add Comment
Please, Sign In to add comment