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

Question: How do I find the parent entity of a component?


NoFoodAfterMidnight
 Share

Recommended Posts

Specifically, I'm looking to add a script to a torpedo when it's created, but to do that I need the entityId of the torpedo, not just it's torpedoId that the callback OnTorpedoLaunched() gives.

Entity(torpedoId) doesn't return the correct Entity.

Kinda solved it by checking for the entity.type Enum using OnEntityCreated() instead, if it checks out as Torpedo it returns the correct value. However it appears torpedoes can't be given scripts, I guess.

Edited by NoFoodAfterMidnight
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...