Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Problem with an Entity object  (Read 2651 times)

0 Members and 1 Guest are viewing this topic.

Javi-Wan Kenobi

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Problem with an Entity object
« on: February 25, 2007, 10:39:21 PM »

I have an Entity object wich is part of the scene layout. In the script for other entities in that scene, I have to access one of their custom properties, but when I use the the Scene.GetNode method I always get [null] as result.
I think I'm not using this method correctly.
What is the good way using this method?




« Last Edit: February 26, 2007, 12:13:27 AM by Javi-Wan Kenobi »
Logged

Malasieno

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 28
  • 3D Animation / Musical Score
    • View Profile
    • www.malasieno.com
Re: Problem with an Entity object
« Reply #1 on: February 26, 2007, 12:57:17 AM »

Hi,

have you named the entity in the .entity definition?

i mean:

ENTITY
{
  NAME="mikey"
 // the rest of the definition
}

in some other script of the same scene:

Scene.GetNode("mikey");
Logged

Javi-Wan Kenobi

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Re: Problem with an Entity object
« Reply #2 on: February 26, 2007, 01:08:01 AM »

Ok, I've found my mistake...
I've been writing
Quote
Scene.GetNode(nodename);
instead of
Quote
Scene.GetNode("nodename");
Logged
 

Page created in 0.037 seconds with 24 queries.