Jump to content

Invalid functions on SKSE64?


Recommended Posts

I'm wondering if anybody knows anything about missing functions.

 

I have an LE mod that uses 2 functions actually:

One is Cell.GetNumRefs()

The other is Cell.GetNthRef()

 

They worked perfectly on LE as I was using them to index actors in a cell, but on Special Edition, the function seems to be doing nothing.

I ran debugging lines and now those functions return 0/None

 

But I just checked some SKSE64 source scripts and form types are still inside a script.

So anybody knows what happened? Can I still use these on another way or are they just gone and I need to rewrite the whole thing?

 

A fragment of the script goes like this. I've highlighted the parts that mattter cause they work on LE but return 0 on SE

Spoiler

Event OnUpdate()
    ;LogTrace("OnUpdate Event")
    PlayerCell = PlayerRef.GetParentCell()
    LogTrace("Player Cell = "+PlayerCell)
    ActiveActors = PlayerCell.GetNumRefs(62) ; 62 -> Type of Ref: Character
    LogTrace("ActiveActors = "+ActiveActors)
    ActorCount = 0
    If DebugMode && NewCell
        Timer = Utility.GetCurrentRealTime()
        LogTrace("New Cell Scan Initialized " + Timer)
    Else
        LogTrace("Old cell (No effects regenerate call)")
    EndIf
    While ActorCount <= ActiveActors && PlayerCell == PlayerRef.GetParentCell()
        Actor Subject = PlayerCell.GetNthRef(ActorCount, 62) as Actor
        If Subject != None
            LogTrace("New Actor = "+Subject)
            If Subject.Is3DLoaded()
                Subject.AddSpell(ElementalVulnerability, False) ; Base Effect
                If NewCell
                    RegenerateEffects(Subject)
                EndIf
            EndIf
        Else
            LogTrace("Failed to retrieve an actor (Subject = None) at count = "+ActorCount)
        EndIf
        ActorCount += 1
    EndWhile

 

Edited by Myst42
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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