Random Spawn Actors
BluSpyder
Member Posts: 129
I'm creating a game sort of like Traffic Rush, for iPhone. The game involves getting the actors that are aligned on a grid to reach the other side safely without colliding with other actors. There's a few things I can't figure out how to do at this moment and was hoping someone get point me in the right direction...
1. How do I randomly spawn actors to move across the grid. For example: In Traffic Rush it will randomly spawn cars to move across, whether its the same car or two different cars, horizontally or vertically, left or right side. How can I set a randomizer in GameSalad to spawn actors randomly? What I tried was creating an actor for each horizontal and vertical side, and each for either starting from left side or right side, Then I created a timer for every 3 seconds to change attribute to random number between 1 and 2. Then if it chose 1, then the actor would respawn there, if 2, then it wouldn't. It sort of works, but I was wondering if someone knows a better or more efficient way?
2. Also like in Traffic Rush, you can swipe the car to make them speed across, and you can tap them to stop. Issues I'm having here is I don't see how swipe can work in GameSalad, can anyone help me on that? And also I know how to make the actor stop when touch is pressed, but how do I set so that when it is pressed again to have the actor moving again?
I would really appreciate some comments and advice.
1. How do I randomly spawn actors to move across the grid. For example: In Traffic Rush it will randomly spawn cars to move across, whether its the same car or two different cars, horizontally or vertically, left or right side. How can I set a randomizer in GameSalad to spawn actors randomly? What I tried was creating an actor for each horizontal and vertical side, and each for either starting from left side or right side, Then I created a timer for every 3 seconds to change attribute to random number between 1 and 2. Then if it chose 1, then the actor would respawn there, if 2, then it wouldn't. It sort of works, but I was wondering if someone knows a better or more efficient way?
2. Also like in Traffic Rush, you can swipe the car to make them speed across, and you can tap them to stop. Issues I'm having here is I don't see how swipe can work in GameSalad, can anyone help me on that? And also I know how to make the actor stop when touch is pressed, but how do I set so that when it is pressed again to have the actor moving again?
I would really appreciate some comments and advice.
Comments
2: Check out this video:
Hope this helps
- Alex
_________________________________________________________________________________
Target Practice Template
Custom Soundtracks and Sound Effects For Sale
Vertical/Horizontal Level Select Template
Mac Mini For SALE!!!
Im newbie too in gamesalad, this video may help you for spawn actor randomly
I still can't figure out how to make the actor so that when it is pressed again to have the actor moving again.