Please help
maya_101
Member Posts: 4
Hi I'm new to GameSalad and I use Windows for GS, but I have a question. Is there any way that I can sort of split up my score into certain categories?
Like for instance, my game that I am creating is a pickup game where you have to collect a certain number of coins of a certain color. Like you would have to collect 3 red coins and 2 blue coins in order to pass the level.
How can I set up my score or a category to track the amount of coins collected for a specific color?
Also, I want to add actors in the game that when picked up by the player will add 5 seconds to the timer in the game, is there a way that I can do that?
Like for instance, my game that I am creating is a pickup game where you have to collect a certain number of coins of a certain color. Like you would have to collect 3 red coins and 2 blue coins in order to pass the level.
How can I set up my score or a category to track the amount of coins collected for a specific color?
Also, I want to add actors in the game that when picked up by the player will add 5 seconds to the timer in the game, is there a way that I can do that?
Best Answer
-
SingleSparq Posts: 1,339And the timer thing. You have a game timer I assume counting down. So game.timer (integer set for say 60 seconds) in a timer rule(every one second): game.timer-1. So if something happens in the game have a rule game.timer+10
Answers
so when an actor overlaps with a red coin, change redScore to redScore + 1
when the actors overlap the time increase, just have it run a time = time + 1 function. should be pretty easy.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
So I would create a level table where each row represents a level. Each column (integer) would be for the coin colours col1 red, col2 blue. Set the number of coins you want in those columns.
Set up game attributes to capture the coins collected during game play (these are temporary only and reset at the beginning or end of each game) game.redcoin, game.bluecoin. As these are collected you add to these attributes and compare them to the limits you set in your table.
If you can't do this in the windows version (comparing table values with game attributes may be only In the nightly build) you can just create the coin limits as game attributes instead, but you would have to change the limit for each level at the start of each level with rule.
So rules like if game level=1 set game.redlimit to 3. Then a rule - if red coins collected = or greater than game.redlimit do something (end game or whatever)
Many ways to do this, just need to play around a bit.
Hope this helped.