Jump to content

Recommended Posts

Posted

Hi,

 

Is it possible to have two seperate entities and parent a third entity to both of these entities? Like so:

 

Parent       Parent
  |           |
   -- Child --

 

Thanks!

Posted

Directly, I don't think so. Closest I can think of is this:

 Parent                 Parent
    |                     |
-- Child -- --joint-- -- Child --

 

(and just hide the child on the right)

LE Version: 2.50 (Eventually)

Posted

Hi,

 

Is it possible to have two seperate entities and parent a third entity to both of these entities? Like so:

 

Parent       Parent
  |           |
   -- Child --

 

Thanks!

 

 

Can I ask what you would be applying this in?

simpleSigPNG.png

 

Programmer/Engineer/Student

www.reikumar.com

 

2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM

C++ - Visual Studio Express - Dark GDK - Leadwerks SDK

Posted

Was afraid so.

 

Basically I have two independent towers that are connected by a beam (plane with a texture). Now, if either one of the towers is destroyed, so should the beam. I was planning on parenting the beam to both towers and then when either tower is destroyed, FreeEntity would also free the beam.

 

Anyway, guess I'll have to find some other way then ;)

 

Thanks everyone!

Posted

Maybe SetEntityTarget() will be suitable for this. Also as I remember it automatically handles deleted entities. So if you delete the tower and the beam, GetEntityTarget() of the second tower will return NULL.

Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64

3ds max / photoshop CS3 / C++

http://www.arbuznikov.com

Posted

I have not yet seen this command but if the index parameter means I can store multiple targets than this would indeed solve my problem. I would simply set the target for the beam to both towers and check for NULL through GetEntityTarget each update call. That would be awesome :)

 

Will try it out as soon as I get home.

 

Thanks!

Posted

You could make this Beam an object and have a pointer to it in each tower. Then when you create a Beam object assign it the to towers that make the connection. Then when your Tower object is destroyed check if the Beam object it has is null and if not destroy it also.

Posted

Hi all,

 

I finally went with SetEntityTarget. The constructor of Beam sets the target to both Towers that are passed via parameters. Then, in the Update() method I check GetEntityTarget for NULL. If either is NULL, the Beam frees itself.

 

Thanks for the help all!

 

Cheers!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...