Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

API: Entity "onAIStateChanged" callback spontaneously stops working


Rinart73
 Share

Recommended Posts

0.18.2 - r12552

 

Wanted to rely on "onAIStateChanged", but it seems that after some time, it just stops firing it.

I checked, there are no errors in my scrip:

 

-- namespace MyTest
MyTest = {}

function MyTest.initialize()
    Entity():registerCallback("onAIStateChanged", "onAIStateChanged")
end

function MyTest.onAIStateChanged(entityId, state)
    print("onAIStateChanged", entityId.string, state)
end

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...