ShadeKirby Posted July 7, 2012 Share Posted July 7, 2012 (edited) I want to make a constant effect spell that gives slight buffs to nearby allies in a certain radius. The thing is, I'm not even sure this is possible with the scripting functions I have available to me. Last time I checked it worked, but with slight bugs. I'm going to post an updated version of the script up on here, I think I cleared most of the bugs but I can't be sure. Scriptname buffAura extends ActiveMagicEffect {Buffs a random target within a certain Radius, using a certain spell.} import game Float Property Radius Auto Spell Property Speel Auto Actor Property Caster auto Event OnEffectStart(Actor akTarget, Actor akCaster) Caster = akCaster RegisterForSingleUpdate(0.1) EndEvent Event OnUpdate() if Caster.isDead() Dispel() Else RegisterForSingleUpdate(0.1) Endif bool i = true Actor target = FindRandomActorFromRef(Caster, Radius) While i == true if !target.IsHostileToActor(Caster) Speel.Cast(Caster, target) endif i = false Endwhile EndEvent Comments? Edit: I'm not using the cloak spell type because I can't figure out how to increase the radius on it, if it is at all possible. Edited July 7, 2012 by ShadeKirby Link to comment Share on other sites More sharing options...
McMutton Posted July 7, 2012 Share Posted July 7, 2012 I'm not versed at all in Skyrim's scripting, but if the Cloak spells cause damage to enemies within a certain radius, surely that can be altered to give positive effects to allies. Link to comment Share on other sites More sharing options...
ShadeKirby Posted July 7, 2012 Author Share Posted July 7, 2012 (edited) I'm not versed at all in Skyrim's scripting, but if the Cloak spells cause damage to enemies within a certain radius, surely that can be altered to give positive effects to allies. That was my original idea, but it seems like the radius is always melee range, and I was trying to give it a longer radius. But if it turns out this idea isn't the best way to go about it and is just a waste of processing power, I'll scrap it. Edited July 7, 2012 by ShadeKirby Link to comment Share on other sites More sharing options...
jimhsu Posted July 7, 2012 Share Posted July 7, 2012 Try increasing the magnitude (not the area) of the cloak spell. Link to comment Share on other sites More sharing options...
ShadeKirby Posted July 7, 2012 Author Share Posted July 7, 2012 Try increasing the magnitude (not the area) of the cloak spell. That did it, I kind of feel stupid for not trying that. Thank you very much, I didn't think to try that. Link to comment Share on other sites More sharing options...
Recommended Posts