4
Fork 0

Butterflies Unchained additions, added an Is3DLoaded() check to WarpToNewPlant() in crittermoth

development
Eddoursul 3 months ago
parent ad5d716e41
commit ead0fa21b8
  1. BIN
      Skyrim.esm
  2. BIN
      scripts/crittermoth.pex
  3. 5
      source/scripts/crittermoth.psc

Binary file not shown.

Binary file not shown.

@ -476,16 +476,17 @@ Function WarpToNewPlant()
if (newPlant != none)
; Update the current plant to the new one
currentPlant = newPlant
bool bIsLoaded = newPlant.Is3DLoaded()
; Pick random landing node
; And start moving towards it
string landingMarkerName = LandingMarkerPrefix + RandomInt(1, 3)
if (newPlant.HasNode(landingMarkerName))
if (bIsLoaded && newPlant.HasNode(landingMarkerName))
WarpToRefNodeAndGotoState(CurrentPlant, landingMarkerName, "AtPlant")
else
; traceConditional(self + " could not find landing marker " + landingMarkerName + " on plant " + newPlant, bCritterDebug)
string firstMarkerName = LandingMarkerPrefix + 1
if (newPlant.HasNode(firstMarkerName))
if (bIsLoaded && newPlant.HasNode(firstMarkerName))
WarpToRefNodeAndGotoState(CurrentPlant, firstMarkerName, "AtPlant")
else
; traceConditional(self + " could not find landing marker " + firstMarkerName + " on plant " + newPlant, bCritterDebug)

Loading…
Cancel
Save