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: NPC (second actor in scene) help  (Read 4309 times)

0 Members and 1 Guest are viewing this topic.

obleo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 18
  • Hail to the King baby!
    • View Profile
NPC (second actor in scene) help
« on: March 01, 2003, 09:49:29 PM »

I have a scene and need to have a second (NPC) actor in there (cause he walks and stuff).
I am loading the npc actor into a global var in the scene_init.script using the Scene.LoadActor method.
I am then attaching a script to the new actor.
When I try and call methods for my new actor from this script using the global var, nothing happens.
Looking in the wme.log file I see: Error@line 12: Variable 'actorBob' is referenced but not defined
Why is this var not in scope?

Thanks!
Logged

obleo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 18
  • Hail to the King baby!
    • View Profile
Re:NPC (second actor in scene) help
« Reply #1 on: March 01, 2003, 10:17:48 PM »

Nevermind.  I figured it out. :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:NPC (second actor in scene) help
« Reply #2 on: March 02, 2003, 09:30:26 AM »

Yeah, you need to declare the variable even if it's global. By declaring it you actually "connect" it to the global definition.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.019 seconds with 24 queries.