Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScriptName MagicEffect extends Form
- Bool IsEffectFlagSet(Int 0x00008000)
- ClearEffectFlag(1 0x00008000)
- SetEffectFlag(1 0x00008000)
- Method 1:
- Setting Enchantment with conditions???
- Method 2:
- Setting magic effect 'Hide in UI'-flag with conditions if possible
- I need a bit of help with a script to change an enchantment based on a couple of conditions:
- if effect1 is active on the player set enchantment to ench1
- if effect1 is NOT active on the player AND effect2 IS set enchantment to ench2
- if effect1 is NOT active on the player AND effect3 IS set enchantment to ench3
- if effect1 is NOT active on the player AND effect4 IS set enchantment to ench4
- if effect1, effect2, effect3, effect4 ARE NOT active on the player set enchantment to ench5
- What i got so far is this:
- ```ScriptName KonahrikSwitchScript extends Form
- {Script to Switch Konahrik's Enchantment for Akatosh's Blessing, and each of the Meditation effects}
- Effect property BlessingAkatosh auto
- bool KonahrikTIID
- Effect property KonahrikEffectFEIM auto
- bool KonahrikFEIM
- Effect property KonahrikEffectFUS auto
- bool KonahrikFUS
- Effect property KonahrikEffectYOL auto
- bool KonahrikYOL
- ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
- Effect property BlessingAkatosh auto
- if Effect active on player set boolean "KonahrikTIID" to true
- if not set boolean "KonahrikTIID" to false
- ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
- Effect property BlessingAkatosh auto
- KonahrikEffectFEIM
- if Effect NOT active on player
- AND
- ;Property containing the effect "GreybeardsFeimAbility "Eternal Spirit" [SPEL:000E827D]"
- effect active
- set boolean "KonahrikFEIM" to true
- if not set boolean "KonahrikFEIM" to false
- ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
- Effect property BlessingAkatosh auto
- KonahrikEffectFUS
- if Effect NOT active on player
- AND
- ;Property containing the effect "GreybeardsFusAbility "Force Without Effort" [SPEL:000E8281]"
- effect active
- set boolean "KonahrikFUS" to true
- if not set boolean "KonahrikFUS" to false
- ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
- Effect property BlessingAkatosh auto
- KonahrikEffectYOL
- if Effect NOT active on player
- AND
- ;Property containing the effect "GreybeardsYolAbility "The Fire Within" [SPEL:000E8282]"
- effect active
- set boolean "KonahrikYOL" to true
- if not set boolean "KonahrikYOL" to false
- ;Property containing the effect "FortifyMagickaRateFFSelf "Regenerate Magicka" [MGEF:000FB989]"
- Effect property BlessingAkatosh auto
- ;Property containing the effect "GreybeardsFeimAbility "Eternal Spirit" [SPEL:000E827D]"
- Effect property KonahrikFEIM auto
- ;Property containing the effect "GreybeardsFusAbility "Force Without Effort" [SPEL:000E8281]"
- Effect property KonahrikFUS auto
- ;Property containing the effect "GreybeardsYolAbility "The Fire Within" [SPEL:000E8282]"
- Effect property KonahrikYOL auto
- if KonahrikTIID == false
- KonahrikFEIM == false
- KonahrikFUS == false
- KonahrikYOL == false
- AND
- none of the effects above are active
- ;Property containing the enchantment "KonahrikEnchTIID"
- ;Property containing the enchantment "KonahrikEnchFEIM"
- ;Property containing the enchantment "KonahrikEnchFUS"
- ;Property containing the enchantment "KonahrikEnchYOL"
- ;Property containing the enchantment "KonahrikEnchDEF"
- if KonahrikTIID == true
- SetEnchantment.KonahrikTIID
- elseif KonahrikFEIM == true
- SetEnchantment.KonahrikFEIM
- elseif KonahrikFUS == true
- SetEnchantment.KonahrikFUS
- elseif KonahrikYOL == true
- SetEnchantment.KonahrikYOL
- else
- SetEnchantment.KonahrikDEF```
- Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
- Parameters
- akCaster: The ObjectReference that is responsible for the spell.
- akEffect: The MagicEffect that is attempting to be applied.
- Examples
- Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
- Debug.Trace(akCaster + " applied the " + akEffect + " on us")
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement