iplo472 Posted July 19, 2013 Share Posted July 19, 2013 I'm trying to figure out how to write a basic script for summoning an item in the world with a spell and I'm a little lost. I found this example script on the wiki and it says to fill in properties with reference IDs, but I'm not sure what defines a property. So for example, if I wanted to summon a loaf of bread, what would I have to replace? And would I need to have a specific loaf of bread sitting somewhere in the world to use as a reference? I'm not sure I completely understand that concept. Thanks for the help! Here's the template script: ScriptName RepeatableSummonEffectScript extends ActiveMagicEffect Actor Property YourSummonREF Auto ; Event OnEffectStart(Actor akTarget, Actor akCaster)Summon(akCaster, YourSummonREF)EndEvent Function Summon(ObjectReference akSummoner = None, ObjectReference akSummon = None, Float afDistance = 150.0, Float afZOffset = 0.0, ObjectReference arPortal = None, Int aiStage = 0) GlobalWhile aiStage < 6aiStage += 1If aiStage == 1 ;arPortal = akSummon.PlaceAtMe(Game.GetFormFromFile(0x0007CD55, "Skyrim.ESM")) ; ElseIf aiStage == 2 ;akSummon.Disable()ElseIf aiStage == 3 ;arPortal.MoveTo(akSummoner, Math.Sin(akSummoner.GetAngleZ()) * afDistance, Math.Cos(akSummoner.GetAngleZ()) * afDistance, afZOffset)ElseIf aiStage == 4 ;akSummon.MoveTo(arPortal)ElseIf aiStage == 5 ;akSummon.Enable()EndIfUtility.Wait(0.6)EndWhileEndFunction Link to comment Share on other sites More sharing options...
SeraphimKensai Posted July 19, 2013 Share Posted July 19, 2013 you'd have to make a dummy cell for your loaf of bread to be stored when not in use and then it would be linked by ref to your script. i think you could even eat it as the bread item would then disable giving you the effect. I'm assuming. I'll take a look at this sometime within a week as I had an idea to make a spell rain down gold ingots on a target location, which I could then use to kill an enemy or make my own personal fort knox out of gold bricks, but as I've mentioned on a couple threads I'm in the process of moving so my time I can work is sporadic at best. Link to comment Share on other sites More sharing options...
iplo472 Posted July 21, 2013 Author Share Posted July 21, 2013 Ok, thanks for the help. If you could show me that script if you get it running that'd be awesome; I think I could pretty easily work with that since there seems to be nothing like it online. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts