HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Parent  (Read 1052 times)

creativityheaven

  • World Owners
  • ****
  • Posts: 156
    • View Profile
Parent
« on: Jun 24, 15, 08:25:24 AM »

To what is a node parented by default? A zone instance ID?
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Parent
« Reply #1 on: Jun 24, 15, 09:05:04 AM »

The current Room.

The following is copied from the editHandler script under AddInstance just so you can see the association made.
This script is an HE only script, but contains good infos like this. :D


Code: [Select]
AddAssociation( room, "base_hard_association", instance )
    AddAssociation( instance, "AssetReferenceAss", asset )

So its not "parented", but bound to the RoomNode by a hard association.

Hrm this begs a bit more...

The above is true IF its an instance such as a ... speedTree or model asset, or  a light etc that you've placed using the blade.

If you're talking about a nodeRef created by script, then it is connected to nothing at all and will shortly self destruct if its not persistant (in which case it might wind up orphaned without an owner or parent)

The latter must be hard associated to some other persistant node (such as the areaRootNode or a player char etc)
in order to persist.

If you can specify why you need the "parent" we might be able to help a bit further.
There are ways of tracking that info down through script.

Hope that helps
« Last Edit: Jun 24, 15, 09:13:41 AM by ToY-Krun »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Parent
« Reply #2 on: Jun 24, 15, 12:07:27 PM »

Came across this in the wiki and thought I'd share it, it shows the hierarchy for areas/rooms/instances etc

http://hewiki.heroengine.com/wiki/File:Area_Node_Structure.jpg