OGCT10 Posted November 8, 2021 Share Posted November 8, 2021 (edited) Hi, Im trying to make a spell to summon a target which was previously tagged by my spell with unique keyword. I can't make this script to work, pretty new at this stuff. ScriptName OGCT_SummonAnimal extends ActiveMagicEffect Actor Property PlayerREF Auto Actor MyAnimal ;Auto Function OnEffectStart(Actor akTarget, Actor akCaster) MyAnimal = akTarget.HasMagicEffectWithKeyword("AnimalControl") float az = PlayerRef.GetAngleZ() MyAnimal.SetAngle(0.0, 0.0, az + 180.0) ; so actor is facing player MyAnimal.MoveTo(PlayerREF, 200.0 * Math.sin(az), 200.0 * Math.cos(az), 0.0, false) EndFunction Any help appriciated. Edited November 8, 2021 by OGCT10 Link to comment Share on other sites More sharing options...
Sphered Posted November 8, 2021 Share Posted November 8, 2021 You have to tell it who the animal actor is. I assume you are pointing to one that already exists so in the CK you would want to assign MyAnimal to the actor you want The keyword check you have there is a bool so yeah its not finding MyAnimal. If you want that keyword check you could do that as a condition in the CK too so this effect wont even happen unless its got that keyword Link to comment Share on other sites More sharing options...
OGCT10 Posted November 8, 2021 Author Share Posted November 8, 2021 (edited) Edit: deleted previous answer..I gottcha, totally misunderstood u at first xD Ty for pointing that out, but how do I do that 1st step in CK? Adding a keyword to actors or some other mojo? I guess script is good just need to remove that MyAnimal boolean. Will try tommorow to do this. 2nd Edit: Still stuck, I know I can attach actor in magic effect of spells script section but I need every animal actor to be able to be summoned if they are affected by my other spell. So I guess I need somehow to get script dynamicly change actors depending if they are under effect of certain spell Edited November 9, 2021 by OGCT10 Link to comment Share on other sites More sharing options...
OGCT10 Posted November 9, 2021 Author Share Posted November 9, 2021 (edited) I got around it somehow with this script: ScriptName OGCTSummonAnimal extends ActiveMagicEffect ReferenceAlias Property BosmerAnimalFollowOGCT Auto Event OnEffectStart(Actor akTarget, Actor akCaster) BosmerAnimalFollowOGCT.GetReference().MoveTo(Game.GetPlayer()) EndEvent Other spell that puts an animal under my control is using reference alias too so my summon spell is cathcing that alias while animal is being under magiceffect of 1st spell and summons an animal to me, problem is however I can't summon them inside buildings, caves etc... so looks like all of this work was for nothing. fk this game Edit: This mod makes this spell/script happen https://www.nexusmods.com/skyrimspecialedition/mods/30034 Edited November 9, 2021 by OGCT10 Link to comment Share on other sites More sharing options...
Sphered Posted November 10, 2021 Share Posted November 10, 2021 Kinda tired so if I misunderstood something my bad in advance To clarify, references/actors can be aliased by multiple quests so that in itself is no issue. However if you are expecting certain AI, the winner there is the quest with top priority. MagicKeywords are active while a magic effect is applied which has that keyword. The point there is to avoid multiple versions of a certain spell type being applied at once. If you want multiple animals there are various ways to manage that. If you cant summon indoors its because something has an interior check preventing it. You'd need to remove that for it to work. Outside of that, some animals like say, mammoths, yeah they wont play nice indoors. Heh Link to comment Share on other sites More sharing options...
Recommended Posts