Enabling & disabling refs via script

Post » Tue Jun 19, 2012 8:15 pm

This was so easy before, but I can't get this to compile. It's a simple amulet I placed in a container when added to the player inventory will enable an x marker. Here's what I get:

Starting 1 compile threads for 1 files...Compiling "BalokTestAmulet01SCRIPT"...c:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\BalokTestAmulet01SCRIPT.psc(7,15): variable BalokTestMarker01 is undefinedc:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\BalokTestAmulet01SCRIPT.psc(7,33): none is not a known user-defined typeNo output generated for BalokTestAmulet01SCRIPT, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on BalokTestAmulet01SCRIPT

Here's the script:

Scriptname BalokTestAmulet01SCRIPT extends ObjectReference  ObjectReference Property EnableXmarker  Auto  Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)    if (newContainer == Game.GetPlayer())			   BalokTestMarker01.enable()    endifEndEvent
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Tue Jun 19, 2012 11:21 pm

You named your property EnableXmarker and you are using BalokTestMarker01 in the script...
User avatar
Liv Brown
 
Posts: 3358
Joined: Wed Jan 31, 2007 11:44 pm

Post » Wed Jun 20, 2012 12:50 am

Thanks. This is my first attempt in beginning to relearn how to do everything I already know in the GECK. I changed the property and event to OnEquipped and it works now. Thanks again!
User avatar
e.Double
 
Posts: 3318
Joined: Tue Jul 24, 2007 11:17 pm


Return to V - Skyrim