Keeping 2 different types of gameplay within a set of scenes?
Hi,
I’m trying to figure out how to have 2 different types of game play within a set of 20 scenes.
What I specifically mean is, for one type of play, I’d like the game to be over when the player collects 50 coins.
The other type of play is, the player continues on indefinitely regardless of number of coins collected.
The player gets to choose either of the game play at the menu screen.
At the moment, I can set it up so that when the Index value = 50, game play is over.
But if the player chooses the other type of game play where they continue on to collect as many coins as possible, how would I go about setting this up without having it conflict with the other type of game play?
Do I need to have 2 sets of 20 scenes for each type of game play? That would come out to be 40 scenes total and I’m sure there is a much more efficient way to achieve this with code.
I’m sort of a beginner and I’m wondering if you have other ideas? Thank you!
Comments
@jimmyxpark
make a game level attribute (e.g. game.GamePlayMode of type integer)
On the menu,
if the player chooses the normal mode, then first set game.GamePlayMode = 0 before changing scene to the game.
If the player chooses endless mode, then first set game.GamePlayMode = 1 before changing scene to the game.
Now, in the actor which currently checks for the win condition of 50, add the game.GamePlayMode as an extra condition:
This will then only stop gameplay at 50 points if normal mode is selected.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
thank you so much @Hopscotch ! I will give this a try