Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Mod = RegisterMod("Your mod name", 1); -- 'Mod' is a placeholder
- local game = Game()
- -- your item
- -- register your item
- CollectibleType.COLLECTIBLE_YOUR_ITEM = Isaac.GetItemIdByName("Your item") -- must be the name you called it in the item.xml file
- function Mod:onTearFire(tear)
- local player = Isaac.GetPlayer(0) -- gets the player (must be modified for coop support)
- player:HasCollectible(TrinketType.YOUR_ITEM) then -- if the player has your item
- -- make sure it doesn't change other tear like things (may needs to be updated for Repentance)
- if not (tear.Variant == 4) -- its not Bob Rotten Head
- or not (tear.Variant == 9) then -- its not Chaos Card
- tear.TearFlags = tear.TearFlags | TearFlags.TEAR_HOMING
- tear.TearFlags = tear.TearFlags | TearFlags.TEAR_SPECTRAL
- end
- end
- end
- Mod:AddCallback(ModCallbacks.MC_POST_FIRE_TEAR, Mod.onTearFire)
Advertisement
Add Comment
Please, Sign In to add comment