Sidescroller, Player and Enemies in lanes
Hi,
my game is growing and growing.
No I had an idea, but I didn't know how the put it in the game:
The game is a sidescroller. And the player (left) and all enemies (random from right to left) should be moving in one of five lanes. The lanes are:
5
4
3
2
1
So if the player starts in lane 3, and he push the down-arrow, he should move to lane 2 and so on.
The opponents (6 differen) should be appear in one of the 5 lanes by random. And if one of them is currently on a lane (till he was destroyed or move left out of the screen) there should be no other at this time.
How can I do that? Did you have an idea?
Best
my game is growing and growing.
No I had an idea, but I didn't know how the put it in the game:
The game is a sidescroller. And the player (left) and all enemies (random from right to left) should be moving in one of five lanes. The lanes are:
5
4
3
2
1
So if the player starts in lane 3, and he push the down-arrow, he should move to lane 2 and so on.
The opponents (6 differen) should be appear in one of the 5 lanes by random. And if one of them is currently on a lane (till he was destroyed or move left out of the screen) there should be no other at this time.
How can I do that? Did you have an idea?
Best
Answers
2. Lets say lane is 1 right now. When up arrow is pressed, change attribute lane to lane+1
3. If lane=2 constrain self position y to this y position
4. Do this for all 5 lanes, and lane-1 for down arrow
To spawn in random lanes, just make an attribute, then have it choose a random number 1-5
Then when it =1, a certain y value, do this for the other 5 as well.
thank you for your comments.
I do 1.
Also I combine the push-buttons for the movement of the character.
But I didn't know how to set the lanes. Are the lanes Actors?