Jump to content

A simple RegisterForSingleUpdate question from a scripting noob...


a1berik660

Recommended Posts

Hi everyone,

 

This script is attached to a fire and forget spell that casts on self. It's got two events in it: one is OnEffectStart and the other one is OnUpdate. Here is the simplified version of it:

scriptname myscript extends ActiveMagicEffect

;--properties--

MyOtherScript Property O_Script Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)

    RegisterForSingleUpdate(1.0)
    
EndEvent

Event OnUpdate()

   If (condition stuff -no syntax errors)
        If (condition stuff -no syntax errors)
            O_Script.MyFunction()
        ElseIf (condition stuff -no syntax errors)
            O_Script.MyFunction()
        Else
            RegisterForSingleUpdate(10.0)
        EndIf
    Else
        do some other stuff
    EndIf

EndEvent

Unfortunately, the script doesn't register for an update...

Papyrus log gives me an error saying that

"Error: Unable to call RegisterForSingleUpdate - no native object bound to the script object, or object is of incorrect type"

I'm trying to understand the error, but it's hardly making any sense to me. It would be great if someone could shine a light on it.

 

edit: problem solved...

Edited by a1berik660
Link to comment
Share on other sites

  • Recently Browsing   0 members

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