mmft93 Posted November 21, 2018 Share Posted November 21, 2018 So I've been trying to write this script all day today. Finally i got it to compile without any errors only problem is in the game it does nothing. What supposed to happen is, the player uses the spell to surround themselves with trees for protection (like a tree wall). I wrote a script to spawn the trees (activators) and then to move them to surround the player, however like i mentioned nothing happens in game when the spell is cast. Can anyone help me or at least point me in the right direction? Scriptname MMFTDruidSpellTreeDome extends MagicEffect actor Property akCaster autoactor Property akTarget autoactivator Property akActivator auto ObjectReference Tree1ObjectReference Tree2ObjectReference Tree3ObjectReference Tree4 Event OnEffectStart(Actor akTarget, Actor akCaster)Tree1 = akCaster.PlaceAtMe(akActivator)Tree2 = akCaster.PlaceAtMe(akActivator)Tree3 = akCaster.PlaceAtMe(akActivator)Tree4 = akCaster.PlaceatMe(akActivator)Tree1.MoveTo(akCaster, 0, 0, 5)Tree2.MoveTo(akCaster, 5, 0, 0)Tree3.MoveTo(akCaster, 5, 0, 0)Tree4.MoveTo(akCaster, 0, 0, 5)EndEvent Link to comment Share on other sites More sharing options...
Elias555 Posted November 21, 2018 Share Posted November 21, 2018 Try this and tell me what happens. Scriptname MMFTDruidSpellTreeDome extends MagicEffect activator Property akActivator auto Event OnEffectStart(Actor akTarget, Actor akCaster) ObjectReference Tree1 = akCaster.PlaceAtMe(akActivator) ObjectReference Tree2 = akCaster.PlaceAtMe(akActivator) ObjectReference Tree3 = akCaster.PlaceAtMe(akActivator) ObjectReference Tree4 = akCaster.PlaceatMe(akActivator) Tree1.MoveTo(akCaster, 50, 50, 0) Tree2.MoveTo(akCaster, 50, -50, 0) Tree3.MoveTo(akCaster, -50, 50, 0) Tree4.MoveTo(akCaster, -50, -50, 0) EndEvent Link to comment Share on other sites More sharing options...
steve40 Posted November 21, 2018 Share Posted November 21, 2018 Check your script log for errors. Link to comment Share on other sites More sharing options...
mmft93 Posted November 21, 2018 Author Share Posted November 21, 2018 Ok, tried your edit Elias and still nothing. The trees are still not spawning. I even turned of collision after using the spell to try and run around and find them but they were no where to be found. Steve, not sure how to check script log for errors. When i compile it in CK it says success no failures. I did notice after i gave my self the spell in the game and then opened console it said script not saved, but after doing it on a new save game and that messaged left. Still no results though. Link to comment Share on other sites More sharing options...
Elias555 Posted November 21, 2018 Share Posted November 21, 2018 Did you fill the properties? Post a pic of the activator. Link to comment Share on other sites More sharing options...
steve40 Posted November 21, 2018 Share Posted November 21, 2018 Is your script even firing? Add a Debug.Notification message to the OnEffectStart event and see if the message shows when you cast the spell. Link to comment Share on other sites More sharing options...
steve40 Posted November 21, 2018 Share Posted November 21, 2018 Ok, tried your edit Elias and still nothing. The trees are still not spawning. I even turned of collision after using the spell to try and run around and find them but they were no where to be found. Steve, not sure how to check script log for errors. When i compile it in CK it says success no failures. I did notice after i gave my self the spell in the game and then opened console it said script not saved, but after doing it on a new save game and that messaged left. Still no results though. https://www.creationkit.com/index.php?title=FAQ:_My_Script_Doesn%27t_Work! Link to comment Share on other sites More sharing options...
mmft93 Posted November 21, 2018 Author Share Posted November 21, 2018 Fixed it :) thanks guys. The script wasn't firing. in the title i had, Scriptname MMFTDruidSpellTreeDome extends MagicEffect I changed the ending (not sure what that part is called sorry) to,Scriptname MMFTDruidSpellTreeDome extends ActiveMagicEffect The log said the bases did not match between my script and my magic effect. I don't fully understand why this fixed it but it did haha. Thanks again :) Link to comment Share on other sites More sharing options...
PeterMartyr Posted November 21, 2018 Share Posted November 21, 2018 Exactly what is the position your trying to move to 360 degrees, then offset, referencing whom you are moving too?? Then let's not forget Math.cos & Math.sin, I hate to tell you this, but your script still needs a lot of work. But if your happy with it, go with it. But it will move along world X & Y, while ignoring the Z Angle of the akCaster. Just Sayin. Link to comment Share on other sites More sharing options...
mmft93 Posted November 22, 2018 Author Share Posted November 22, 2018 Thanks Peter, but it does what I need it to do. I'm aware of the whole math side but sadly I don't get math, all that is beyond me lol. I just wanted to spawn my activators to surround the player, which they did. Link to comment Share on other sites More sharing options...
Recommended Posts