Randomly putting actors on screen

bahtiyar445bahtiyar445 Member Posts: 4
edited November -1 in Working with GS (Mac)
Hello,

Im working on game that user see boxes lined up and when user click on it, it opens box and icon shows up..each box has different icons..Each level layout is different..for example level 1 has 10 boxes, 5 in first line 5 second line..what i wanna do is, whenever user play level 1, i want to change icons positions randomly..for example first time user play game, bird icon is in the 6.box, second time user wants to play game, bird icon will be in the 2.box...so user wont know which box has which icon anytime...how can i do that?

Thanks

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, one way to do this: make a game integer attribute called BirdBoxNum. In a blank actor off-screen, for each scene, put a change attribute BirdBoxNum to random(1,--the maximum amount of boxes on each particular scene--). In the first box boxes Rules, put when BirdBoxNum = 1, change Image to Birdicon (or move, or spawn BirdIcon to the box's x and y or to just above it). Could even have the image fade in with interpolate alpha to 1, could be nice. In the 2nd box, whenBirdBoxNum=2, change image to BirdIcon, etc.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.