Jump to content

Please Help with Script


mil3nko666

Recommended Posts

trying to make a spell that is used by an npc to heal another npc, i got the spell working but the spell works as a hostile spell so when the caster casts a healing spell on his "enemy" the target attacks the healer,

i have the npc's set up like this The Target is in a faction that is marked as ally to the caster, and the casters faction is enemy with the target,

so what im thinking is a solution is adding a script to the magic effect as a extendmagiceffect to Stopcombatalarm of the target.

But Ive Never Scripted anything before and im not sure how to write it all out i figure it would go something like this

Scriptname StopCompbatAfteCast extends activemagiceffect

Event OnEffectFinish(Actor target)
target.StopCombatAlarm(Actor.AmooreMasterHealerNordF01)
EndEvent

 

But when i try to save or compile or whatever i get errors so im assuming its wrote wrong if some that has knowledge in this could help me i'd appreciate it alot, ive been workin at this for awhile and im at a loss.

 

Heres a link to a pic with the errors

http://s48.beta.photobucket.com/user/mil3nko666/media/Untitled-6.jpg.html

Edited by mil3nko666
Link to comment
Share on other sites

I don't know much at all about spells and scripts, but seeing as no-one else has said anything I thought I'd chime in...

 

In the magic effect section of Creation Kit, double click your magic effect and there's a section of tickable boxes - perhaps untick things like "hostile" "painless" "detrimental" and anything else that looks possibly negative. Then go to your spell and turn off (set to 0) magnitudes for any part of the spell that'll cause damage to others.

 

I don't know if that'll work, but it may be worth a go.

Link to comment
Share on other sites

well i got it set so that the caster (healer) is an ally to the target but the target is a enemy to the Caster, that was the only way i can get the caster to cast a healing spell (which acts as a offensive spell) on the target but since the spell is marked hostile the target reacts as if it was hit with an offensive spell, what i need is a script for the magic effect to StopCombatAlarm

Link to comment
Share on other sites

First off, there already are in-game spells with healing effects. If, for whatever reason, you don't want to use them, then you can always take a look at them in the Magic Effect window and try to see what parts of your spell are different and how these might cause hostility.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...