Jump to content
Sign in to follow this  

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

Recommended Posts

Posted (edited)

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

Share this post

Link to post
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
Sign in to follow this  

  • Create New...