Another Respawn

MERMMERM Member Posts: 194
edited November -1 in Working with GS (Mac)
Ok as many of you know im fairly stupid. so, im making another respawn game but this time you click the box and it adds to the score and respawns another box, which then adds to the score and respawns ANOTHER box when you click on it and goes on forever. so, I added the when clicked, destroy and spawn actor box random(0,720),random(0,480) and it respawns once perfectly and adds to the score. the only problem is that it doesn't do anything when i click on it... please help.... i'm just a poor, helpless 7th grader nerd working on his science fair project...

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Erm... still not sure, if I understand it, but I give it a try:

    The box on the screen should add to the score, spawn another box if clicked and then disappear. Right?

    you need one actor with the box. Then I would do the following:

    If touch pressed
    change attribute game.score to game.score+1
    spawn BOX randomX,randomY relative to screen
    after 0.1 sec
    destroy actor.

    That's all
  • MERMMERM Member Posts: 194
    Hunnenkoenig said:
    Erm... still not sure, if I understand it, but I give it a try:

    The box on the screen should add to the score, spawn another box if clicked and then disappear. Right?

    you need one actor with the box. Then I would do the following:

    If touch pressed
    change attribute game.score to game.score+1
    spawn BOX randomX,randomY relative to screen
    after 0.1 sec
    destroy actor.

    That's all

    Thats what I have, but when i click on the second box it doesn't dissapear and respawn another...
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    are you sure, you set the random relative to screen?

    If not, it may happen, that it spawns on top of the first box and you don't see it disappear, or it spawns outside the screen, because the 480 relative to actor can be outside, if your box is at 470 :-P

    Send me your GS file and I look at it.
    hunnenkoenig@chello.at
  • MERMMERM Member Posts: 194
    I have it relative to scene, and the only other option its giving me is actor...

    the box appears, it just doesn't do anything :((
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    are the rules for the box you touch in the actor in the actor pane, not a instance you dragged onscreen?
  • MERMMERM Member Posts: 194
    i dragged the actor on the screen, did the double click, and did it in there
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    thats why its not working. you have to put all the rules in the actor on the left that you made, not one of that kind you dragged onto the scene and double clicked. WHen you drag a actor onscreen and double clikc, it unlocks it and any rules you put in there will only apply to that one, and not ones of the same kind that are spawned.
  • MERMMERM Member Posts: 194
    ok so i added it to that one, but now it just freezes and does the little rainbow spinny not responding thing. should i delete the other one?
Sign In or Register to comment.