1 Reply Latest reply on Jun 11, 2006 1:11 PM by Newsgroup_User

    Need help!

    kikibian Level 1
      I was refering the codes of making a simple bullet shooting game, however, the bottom lines supposed to result when user hit the SHIFT key and bullets come out from the cannon, but when I hitted the SHIFT key, a window popped up and warning: "Script error : Handler not defined, shoot sprite bullet, #shoot" who one knows what handler did I miss or incorrect? Thanx!

        • 1. Re: Need help!
          Level 7
          > -- shift key sends shoot message to bullet
          > if the shiftDown then
          > shoot sprite bullet
          > end if

          You have "bullet" defined as 2, so in effect you are calling the #shoot
          handler of sprite 2. If the sprite called doesn't implement the named
          handler you get an error.
          You could use 'sendSprite()' so that you don't get an error, but I
          suspect you need to implement or attach the handler to a sprite