Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Fire = RegisterMod("YourModName", 1)
- local game = Game() -- just for good practice
- -- damage callback
- function Fire:OnDamage(entity,amount,flag,source,countdown)
- -- If the player(entity) is your character
- if entity:GetName() == "CharacterName" then
- -- check for the source
- if source.Type == EntityType.ENTITY_FIREPLACE then -- it a fire
- return flase
- end
- if source.Type == EntityType.ENTITY_EFFECT
- and source.Variant == EffectVariant.BOMB_EXPLOSION then -- not sure if the fire mind explosion count as a bomb explosion
- if source.SpawnerType == EntityType.ENTITY_TEAR
- and source.SpawnerVariant == TearVariant.TEAR_FIRE_MIND then -- spawned by fire mind tear
- return false
- end
- end
- end
- end
- Fire:AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, Fire.OnDamage, EntityType.ENTITY_PLAYER)
Add Comment
Please, Sign In to add comment