Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: obleo on March 01, 2003, 09:49:29 PM

Title: NPC (second actor in scene) help
Post by: obleo 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!
Title: Re:NPC (second actor in scene) help
Post by: obleo on March 01, 2003, 10:17:48 PM
Nevermind.  I figured it out. :)
Title: Re:NPC (second actor in scene) help
Post by: Mnemonic 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.