I've been using the Fallout 4 Creation Kit for maybe less than a week and I'm totally stumped on this one issue. Here is my example: This is a script made by Bethesda:
Scriptname NukaColaBottleCapAdderSCRIPT extends ActiveMagicEffect Const
{This script causes nuka products to add one bottlecap to the actor who consumes the drink.}
MiscObject Property Caps001 Auto Const
Event OnEffectStart(Actor akTarget, Actor akCaster)
akCaster.additem(Caps001)
EndEvent
And here is my modification of the script:
Scriptname BottleAdderScript extends ActiveMagicEffect Const
{This script causes a drink to add one empty beer bottle to the actor who consumes the drink.}
MiscObject Property BeerBottleEmpty01 Auto Const
Event OnEffectStart(Actor akTarget, Actor akCaster)
akCaster.additem(BeerBottleEmpty01)
EndEvent
I don't understand why the original script works but mine doesn't appear to do anything at all. I've added the script to the magic effect. I've saved and compiled the script. I've attached the magic effect to the potion (purified water and dirty water.) All other mods I have installed still work and I can get a simple "Hello, World" text box script to run based on a tutorial I found. No idea what I'm doing wrong here. Could someone please help? Thank you.