Rinart73 Posted September 4, 2019 Share Posted September 4, 2019 Avorion: 0.26 "initializationFinished" doesn't trigger for an entity when script is being attached after entity creation. How to reproduce: data/scripts/entity/mymod.lua -- namespace MyMod MyMod = {} function MyMod.initialize() print("MyMod.initialize happened") end function MyMod.initializationFinished() print("MyMod.initializationFinished happened") end Try to attach this script to entity that already exists in a loaded sector: /run Entity():addScriptOnce("data/scripts/entity/mymod.lua") You will get only one message: MyMod.initialize happened If you'll then reload a sector (leave and come back after some time or restart the galaxy), two lines will be printed: MyMod.initialize happened MyMod.initializationFinished happened Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now