Jump to content

Change Nirnroot script


TangerineDog

Recommended Posts

I'm trying to make the Nirnroot drop a misc item, so I changed the Nirnroot activator script to this:

 

Scriptname NirnrootMiscItemACTIVATORScript extends ObjectReference Hidden
{Script to only be applied to the NirnrootACTIVATOR base object.}

MiscObject Property NirnrootMiscItem Auto
Message Property HarvestNirnrootMESSAGE Auto
Activator Property NirnrootGlowACTIVATOR Auto
Activator Property NirnrootEmptyACTIVATOR Auto

ObjectReference Property NirnrootGlowReference Auto Hidden
ObjectReference Property NirnrootEmptyReference Auto Hidden
ObjectReference Property EmptyRef Auto Hidden
Bool Property HasBeenLoaded Auto Hidden

Float NirnScale


EVENT OnCellAttach()

if (self.IsDisabled() == FALSE)
NirnrootGlowReference = PlaceAtMe(NirnRootGlowACTIVATOR)
NirnrootEmptyReference = PlaceAtMe(NirnRootEmptyACTIVATOR)
NirnrootEmptyReference.DisableNoWait()
endif

endEVENT



EVENT OnReset()

if (self.IsDisabled() == TRUE)
self.Enable()
GoToState("WaitingForHarvest")
endif

endEVENT



Auto STATE WaitingForHarvest

EVENT onActivate(ObjectReference TriggerRef)
GoToState("AlreadyHarvested")
Nirnscale = Self.GetScale()
NirnrootEmptyReference.SetScale(Nirnscale)
NirnrootEmptyReference.EnableNoWait()
(TriggerRef as Actor).additem(NirnrootMiscItem, 1)
Game.IncrementStat( "Nirnroots Found" )
NirnRootGlowReference.DisableNoWait()
NirnRootGlowReference.Delete()

self.DisableNoWait()

endEVENT

endSTATE



STATE AlreadyHarvested


endSTATE

 

Only now, even with no other mods loaded, it drops the misc item AND the Nirnroot ingredient!

 

Why?

 

Edit: Even when I remove all scripts from the Nirnroot, it still drops the ingredient. Something is still influencing the thing, but what?

Edited by TangerineDog
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...