1
Technical forum / 2 actors in a scene
« on: November 16, 2004, 07:27:15 AM »
Hey, beautiful people!
OK, I ran into a problem again. Maybe it was the late hour of the nite, or my stupidity, but nevertheless here it is:
On a scene I've set two actors. One of them is my regular, player controlled actor, the other one is Molly - the woman from the demo.
Anywayz, I took things for granted and didn't really do anything with her until know, when I wanted to test interactivity between my two actors.
On scene_init I load her (Molly) up, I make her interactive, movable, visible and I attach a script to her (a customized scene_object WME template). Also, on some random event I want to make her walk to a certain entity. Now these are my problems:
- When I try to walk to her, talk to her, take her or look at her, everything in the attached script works except the walking part. It gives me runtime error. In the script I have the default actor.GoToObject(this), but the log says that method needs an entity parameter. How do I reference Molly in this case? I thought "this" works for everything.
- When I try to make HER walk to the entity - she doesn't. I use the typical Zenska.GoToObject(Scene.GetNode("sign")); <- where Zenska is a global variable defined in base.inc with Molly loaded in. Now, she does do the WalkToDirection part (she turns in the place where she is), but she doesn't do the WalkToX and WalkToY part of the GoToObject instruction. The "sign", of course, has all that WalkTo properties set.
That's it, now you...
OK, I ran into a problem again. Maybe it was the late hour of the nite, or my stupidity, but nevertheless here it is:
On a scene I've set two actors. One of them is my regular, player controlled actor, the other one is Molly - the woman from the demo.
Anywayz, I took things for granted and didn't really do anything with her until know, when I wanted to test interactivity between my two actors.
On scene_init I load her (Molly) up, I make her interactive, movable, visible and I attach a script to her (a customized scene_object WME template). Also, on some random event I want to make her walk to a certain entity. Now these are my problems:
- When I try to walk to her, talk to her, take her or look at her, everything in the attached script works except the walking part. It gives me runtime error. In the script I have the default actor.GoToObject(this), but the log says that method needs an entity parameter. How do I reference Molly in this case? I thought "this" works for everything.
- When I try to make HER walk to the entity - she doesn't. I use the typical Zenska.GoToObject(Scene.GetNode("sign")); <- where Zenska is a global variable defined in base.inc with Molly loaded in. Now, she does do the WalkToDirection part (she turns in the place where she is), but she doesn't do the WalkToX and WalkToY part of the GoToObject instruction. The "sign", of course, has all that WalkTo properties set.
That's it, now you...