1 Reply Latest reply on Sep 4, 2006 1:52 AM by Newt99

    Script does not get called

    Roofy
      Hi there, I am trying to setup a quad view on my stage by placing 4 sprites on the stage with the same 3D cast member. I then apply a behaviour script that initalizes the 4 sprites in their correct positions and sets up the 4 different camers as follows...

      topView
      perspView
      sideView
      frontView

      ... however, doing so, the script gets called only on the first sprite and the other 3 sprites do not react with the behaviour script. As a matter of fact, I also have a sendAllSprites command inside the behaviour script and it does not send the message to all of the sprites with that piticular behaviour script. Is the reason why the behaviour script does not work on the other 3 sprites because I need a diferent 3d castmember for each sprite?
        • 1. Re: Script does not get called
          Newt99

          Hello,

          You don't need to place 4 sprites of the same W3D cast member in the score.

          1- Place a single occurence (sprite) of the W3D cast member in the score
          2- Create 4 cameras either in your 3D package or by code using member.newCamera():

          topView
          perspView
          sideView
          frontView

          3- Set the rect of the four cameras so they correspond to each corner of the screen
          4- Use sprite.addCamera() in order to add the four cameras to the W3D sprite

          That's all you need.

          Best regards,
          Karl Sigiscar.

          http://www.chromelib.com