Back to Blog
Master spell animations6/1/2023 If you like my work, consider saying thanks on Discord: jackkerouac#0624. In Foundry VTT, fiiles will be located in your "Data\modules\animated-spell-effects\spell-effects" folder. All files are in transparent webm format. More than 350 (and growing!) animated effects for spells for use with various VTT's in the top-down/overhead perspective. Local modifiery = damagearea.Row - centre.More than 350 (and growing!) animated effects for spells for use with various VTT's in the top-down/overhead perspective. Local animationDelay = math.random(1,6) * delay adjust delay randomizer here, different animations have different "sweet-spot" delays Due to its wild nature, the spell may inflict a variety of effects on the enemy units (some possibly positive), which may or may not have a lasting effect on. Local targeted = true - is this a targettable spell? (strike or gfb-like spell etc)Ĭreaturepos = creature:getTarget():getPosition() Position(pos):sendMagicEffect(CONST_ME_GROUNDSHAKER) Position(pos):sendMagicEffect(CONST_ME_STONES) if Position(pos):isSightClear(playerpos) then This is only applicable for directional spells Local max = (level / 5) (maglevel * 3.0) 28 Local min = (level / 5) (maglevel * 1.6) 16 Here is the rotation code I use, you'll need to add the rotate function to the bottom of your spells\lib\a file if you want to use the fire wave script from this thread:Ĭombat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) This is done automatically for the combat object/area but for the animation logic you'd need to do this again. With fire wave (or any directional spell), the direction of the wave needs to be rotated depending on the direction you are facing. Local direction = creature:getDirection()Īnimationarea = rotate_CW_90(animationarea)Īnimationarea = rotate_180(animationarea)Īnimationarea = rotate_CCW_90(animationarea)ĭamagepos.x = damagepos.x modifierx directionalxĭamagepos.y = damagepos.y modifiery directionalyĪnimationDelay = (modifierx directionalx) * delayĪnimationDelay = (modifiery directionaly) * delayĪnimationDelay = ((modifierx directionalx) * -1) * delayĪnimationDelay = ((modifiery directionaly) * -1) * delay Local directional = true - is spell directional? Position(pos):sendMagicEffect(CONST_ME_HITBYFIRE) If not Tile(Position(pos)):hasProperty(CONST_PROP_BLOCKPROJECTILE) then Local max = (level / 5) (maglevel * 2) 12 Local min = (level / 5) (maglevel * 1.2) 7 Maybe you want to animate fire wave or a stoneshower/gfb area, but you want the damage to apply immediately just like in vanilla tibia: You may want to use both of these systems. Local animationDelay = damagearea.Delay or 0ĪddEvent(animation, animationDelay, damagepos, playerpos) Local modifiery = damagearea.Row - centre.Row Local modifierx = damagearea.Column - centre.Column Local creaturepos = creature:getPosition() Position(pos):sendMagicEffect(CONST_ME_FIREAREA) If Position(pos):isSightClear(playerpos) then if not Tile(Position(pos)):hasProperty(CONST_PROP_BLOCKPROJECTILE) then Each animation frame doesn't have separate combat rolls, so all squares will do the same damage (like vanilla tibia spells)įire a (animated, but static damage)įunction onGetFormulaValues(player, level, maglevel)Ĭombat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues").The damage won't apply in a delayed fashion, synchronized with the animation - it applies immediately.We can achieve the same animation effect, but have the damage roll behave normally. Local max = (level / 5) (maglevel * 2.2) 14Ĭombat:setFormula(COMBAT_FORMULA_LEVELMAGIC, 0, -min, 0, -max)ĪddEvent(executeCombat, (animationDelay * i) - animationDelay, p, i) Local min = (level / 5) (maglevel * 1.4) 8 Frames (1 = Area, 2 = Player, 3 = Player Self Damaging)Ĭombat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)Ĭombat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)Ĭombat:setArea(createCombatArea(area))
0 Comments
Read More
Leave a Reply. |