Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --by kitiketov
- local mod = RegisterMod("BetterDamage",1)
- function mod:WriteDamage(type,damageAmount)
- local file = io.open("gameinfo.txt", "w")
- if file then
- file:write(type.."/".. damageAmount .. "/"..os.time(os.date("*t")).."\n")
- file:close()
- end
- end
- function mod:TakingDamage(entity, damageAmount, damageFlags, damageSource, damageCountdownFrames)
- local player = Isaac.GetPlayer(0)
- if player:IsDead() then
- return
- end
- -- Isaac.ConsoleOutput("DmG"..damageAmount.."\n")
- mod:WriteDamage("shock",damageAmount)
- end
- function mod:UsingHolyEffect(id,volume,frameDelay,loop,pitch,pan)
- -- Isaac.ConsoleOutput("Holy\n")
- mod:WriteDamage("vibro",1)
- end
- mod:AddCallback(ModCallbacks.MC_PRE_SFX_PLAY, mod.UsingHolyEffect, SoundEffect.SOUND_HOLY_MANTLE)
- mod:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, mod.TakingDamage, EntityType.ENTITY_PLAYER)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement