how to constrain rotations of one actor based on a 2nd actors attribute?
![zane1](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Problem:
I have set up a random number generator (1-6) which outputs the text on screen. it works fine.
I then have a dozen or so of the same actor on the screen, each of which can rotate 90 degrees each time you touch one of them (they rotate individually, not as a group)
I would like to constrain the total number of rotations to the random generated number, meaning of it spews a 6, I want to rotate 1 actor 6 times, or 2 actors 3x each, or 4 actors 1x and 1 actor 2x, etc, etc.
once the total number of rotations is "spent" no other actors should be able to rotate until a new random number is generated.
this process should be able to continually repeat.
Does anyone know how to do this?
I tried creating a rule that stated {if the random attribute is = 1, then the actor recieves event-touch-pressed (and rotates to angle when it is)}
this works by constraining all the "rotatable actors" until and only when a #1 is generated, once it is, all "rotatable actors" can then rotate, but it does not limit the number of rotatations.
someone PLEASE HELP!?
I have set up a random number generator (1-6) which outputs the text on screen. it works fine.
I then have a dozen or so of the same actor on the screen, each of which can rotate 90 degrees each time you touch one of them (they rotate individually, not as a group)
I would like to constrain the total number of rotations to the random generated number, meaning of it spews a 6, I want to rotate 1 actor 6 times, or 2 actors 3x each, or 4 actors 1x and 1 actor 2x, etc, etc.
once the total number of rotations is "spent" no other actors should be able to rotate until a new random number is generated.
this process should be able to continually repeat.
Does anyone know how to do this?
I tried creating a rule that stated {if the random attribute is = 1, then the actor recieves event-touch-pressed (and rotates to angle when it is)}
this works by constraining all the "rotatable actors" until and only when a #1 is generated, once it is, all "rotatable actors" can then rotate, but it does not limit the number of rotatations.
someone PLEASE HELP!?