Josh64

?

May 5th, 2019
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. local BaptizedWater = RegisterMod("BaptizedWater", 1)
  2. local game = Game()
  3.  
  4. BaptizedWater.COLLECTIBLE_BAPTIZED_WATER = Isaac.GetItemIdByName("Baptized Water")
  5.  
  6. function BaptizedWater:onUpdate(player)
  7. -- Beginning run initialization
  8. if game:GetFrameCount() == 1 then
  9. BaptizedWater.HasBaptizedWater = false -- what does this do?
  10. end
  11. end
  12. BaptizedWater:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, BaptizedWater.onUpdate)
  13.  
  14. function BaptizedWater:onDeath(entity)
  15. local player = Isaac.GetPlayer(0)
  16. -- Creation of spiders
  17. if player:HasCollectible(BaptizedWater.COLLECTIBLE_BAPTIZED_WATER) then
  18. Isaac.Spawn(EntityType.ENTITY_FAMILIAR, FamiliarVariant.BLUE_SPIDER, 0 entity.Position, entity.Velocity, nil)
  19. Isaac.ConsoleOutput("The cleansing has begun!")
  20. end
  21. end
  22.  
  23. BaptizedWater:AddCallback(ModCallbacks.MC_POST_NPC_DEATH, BaptizedWater.onDeath)
Add Comment
Please, Sign In to add comment