2 Replies Latest reply on Dec 5, 2006 9:24 PM by Kajasinis

    Loading specific and random sprites for random question

      Ok so im not too good when it comes to lingo, in fact im a noob.
      I have figured out from research how to return a draggable sprite to its original location on mouse up and just figured out how to randomly select a sprite from a list.

      The point of my game is to answer the randomly generated questions. The way to answer the question is multiple choice through the use of draggable sprites, each representing a number. These will also be loaded at specific locations from a list. 1 of the random sprites loaded must also be the correct answer which i dont know how to do.

      The following code is applied to the draggable sprites:

      ------------------------------------------------------------------------------------------ -------------
      property pQuestionList, pSprite, pNormalMem

      on beginsprite me
      pQuestionList = ["banana1", "banana2", "banana3", "banana4", "banana5", "banana6", "banana7", "banana8", "banana9", "banana10", "banana11", "banana12", "banana13", "banana14", "banana15", "banana16", "banana17", "banana18", "banana19", "banana20"]
      pSprite = sprite(me.spriteNum)
      pNormalMem = pSprite.member
      whichMem = pQuestionList[random(pQuestionList.count)]
      pSprite.member = whichMem
      end beginSprite

      ------------------------------------------------------------------------------------------ -------------

      Any help apreciated.