Quote:
Originally Posted by badben
I am doing an Alice project and I need the characters to talk when you move into them. I used an event listener to allow you to use arrow keys to move the camera and I want other characters to talk when you move the camera into them. How do I do that?
|
Quote:
Originally Posted by badben
I am doing an Alice project and I need the characters to talk when you move into them. I used an event listener to allow you to use arrow keys to move the camera and I want other characters to talk when you move the camera into them. How do I do that?
|
I would add an item like a small sphere to the movie, you could use a dummy object but I have sometimes had problems with dummy or invisible objects not detecting a collision.
Next put the object where you want the camera to be looking when you "move into them."
Set the vehicle of your new object to the camera and set its opacity to something like 70% so that it is translucent but visible. When you get the movie working you can make the opacity 5-10 % so that it is not as noticeable to the user.
Create a world method that takes an object parameter and does whatever you are looking to do when you move into something.
Finally, create a while event for each object you want to react when you move into them and use the "during" section to call your method passing in the object that has triggered the event.
I have added an example movie with two objects to show you what I mean. Also note that the arrow keys do not allow you to move up and down. I used the old man's neck as the target as his center is on the ground, between his feet.
While this approach will (I believe) work for what you want, keep in mind that there are 374.375 approaches that are just as valid.
Mark