well, ok..
first of all i did (assumingly) exactly what was described in the wiki for several times, without any additions or whatever...
my attempts simply didnt worked out, in other words, there were no notifications like "You did XYZ points of damage." shown.
this time i started righ from the beginning with a few debug-messages.
i used a more ineffective but for me more logical order but still its almost 95%based on the wiki site:
1) created an quest 'aaSpellswordCloakAbilityDistribution' with 'playerref' in 'any' cell and namealias 'aaSpellswordPlayerAlias'.
'aaSpellswordCloakAbility' was added to spells-tab after i created it in 4)
2) created an effect 'aaSpellswordCloakEffect' with 'cloak', 'constant effect' and 'self'.
3) created a "hello world" tutorial script and placed it in the effect 'aaSpellswordQuestCheckEffect'.
Spoiler Scriptname aaSpellswordQuestCheckScript extends activemagiceffect {It prints the message "Quest started" to the screen once.}Event OnInit() Debug.MessageBox("Quest started")EndEvent 4) the effects 2) + 3) were placed in an ability 'aaSpellswordCloakAbility'. the effect 'aaSpellswordCloakEffect' got a magnitude of 14 (it should affect enemies in melee range ,and if idle spare ressources)
5) created script 'aaSpellswordDeliverScript'
Spoiler Scriptname aaSpellswordDeliverScript extends activemagiceffect Spell Property aaSpellswordHitScriptAbility AutoEvent OnEffectStart(Actor akTarget, Actor akCaster) akTarget.AddSpell(aaSpellswordHitScriptAbility) debug.MessageBox("Spell was Cast")EndEvent this was placed in the effect 'aaSpellswordDeliverEffect' with 'script', 'concentration' and 'aimed'. the effect was then put into a new spell 'aaSpellswordScriptDeliverSpell' with the conditions 'getdead = 0' and 'hasmagiceffect aaSpellswordHitScriptEffect = 0'.
6) 'associated item 1' of 'aaSpellswordCloakEffect' was changed to 'aaSpellswordScriptDeliverSpell'
7) created effect 'aaSpellswordHitScriptEffect' with 'script', 'constant effect' and 'self'. in this effect a script 'aaSpellswordHitScript' was placed.
Spoiler Scriptname aaSpellswordHitScript extends activemagiceffect Actor MySelfFloat HealthEvent OnEffectStart(Actor akTarget, Actor akCaster) MySelf = akTarget Health = MySelf.GetActorValue("Health") RegisterForSingleUpdate(0.25)EndEventEvent OnUpdate() Health = MySelf.GetActorValue("Health") RegisterForSingleUpdate(0.25)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) UnregisterForUpdate()EndEventEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, \ bool abSneakAttack, bool abBashAttack, bool abHitBlocked) Float Damage = Health - MySelf.GetActorValue("Health") Health = MySelf.GetActorValue("Health") if (akAggressor == Game.GetPlayer()) Debug.Notification("You did " + Damage as Int + " points of damage.") debug.Messagebox("You hit your Target") endifEndEvent 8) the effect was placed in an ability 'aaSpellswordHitScriptAbility'
i replaced almost all notifications with messageboxes since the notificications are not shown ingame (anyone got a clue?).
i made 2 experiences while running:
a clean save with the activated mod gives me a single time the msg-box "Quest started" and afterwards over and over again the msg-box "Spell was Cast". it is interrupted for half-a second every few msg, assumingly because the cycle starts over again.
a not clean save gives me no message boxes at all. however i have the cloak ability and effect shown in my active-effects tab ingame.
assumingly i dont have working state behind adding the spell, so better just ignore this for now.thats the state of affairs. thanks for you help.
moorleiche2k
ps.: @RandomNoob the non-appereance of notifications as well as not using a clean save might be the reason why i falsy interpreted your example as non-functional. i figured this out while scripting with messageboxes. sorry for the assumption