trouble with spawning actors

disparitiondisparition Member Posts: 32
edited March 2012 in Working with GS (Mac)
If anyone can help be i appreciate, so i have this problem. i have 4 actors lets say actor 1,2,3 and 4 and what i want to do is that when i double tap actor 1 actor 2 appears and so on until you get to actor 4 and then spawn actor 1 again to get the cycle start all over (i do it with 2 taps because i also want to be able to drag and move the actors by holding them down) but the problem is that when actor 1 spawns from actor 4 the game freezes and when you double tap actor 1 it doesnt spawn actor 2, the way that i have my codes are:
i create 4 different game attributes integers (tap1, tap2, tap3, tap4)

Comments

  • disparitiondisparition Member Posts: 32
    ACTOR 1
    > rule
    --- ACTOR receives TOUCH is PRESSED
    -constrain attribute-- game.tap1-to-game.tap1+1
    -otherwise-- timer --AFTER .5s --game.tap1-to-0

    >rule
    --ATTRIBUTE - game.tap1 = 2
    --destroy this actor
    --spawn actor 2 in the place of actor 1

    ACTOR 2
    >rule
    --- ACTOR receives TOUCH is PRESSED
    -constrain attribute-- game.tap2-to-game.tap2+1
    -otherwise-- timer --AFTER .5s --game.tap2-to-0

    >rule
    --ATTRIBUTE - game.tap2 = 2
    --destroy this actor
    --spawn actor 3 in the place of actor 2
  • disparitiondisparition Member Posts: 32
    ACTOR 3
    >rule
    --- ACTOR receives TOUCH is PRESSED
    -constrain attribute-- game.tap3-to-game.tap3+1
    -otherwise-- timer --AFTER .5s --game.tap3-to-0

    >rule
    --ATTRIBUTE - game.tap3 = 2
    --destroy this actor
    --spawn actor 4 in the place of actor 3

    ACTOR 4
    >rule
    --- ACTOR receives TOUCH is PRESSED
    -constrain attribute-- game.tap4-to-game.tap4+1
    -otherwise-- timer --AFTER .5s --game.tap4-to-0

    >rule
    --ATTRIBUTE - game.tap4 = 2
    --destroy this actor
    --spawn actor 1 in the place of actor 4
  • CloudsClouds Member Posts: 1,599
    Are all the actors the same size (Q: could you simply change the image rather than the actor ?)
Sign In or Register to comment.