A few simple questions

Adam3k3Adam3k3 Member Posts: 11
edited April 2012 in Working with GS (Mac)
Im sure that the questions are easy for the pros but as a first timer its kinda tricky to figure out.
Im building a game thats like ball breaker and using that as a templet so here are my c

1. How do you change the set bricks from scene to scene for example I would like to have 8 bricks in stage one but 15 in stage 2 and so on?

2. How do I apply the jump to another scene once all the bricks are cleared? I applied the "change scene" but once the first stage is cleared it takes me to the next one without any movement "nothing is happening on the screen".

3. How do I make certain brick take more then 1 hit from the bouncing ball to be destroyed?

Thats all of what I can remember for now , thanks in advance.

Answers

  • App SurgeApp Surge Member Posts: 651
    Hey @Adam3k3,

    1) On level 1's scene, drag in 8 bricks and change bricksonscreen to 8.
    On level 2's scene, drag in 15 bricks and and change bricksonscreen to 15

    2) Create an actor and have a rule that says when game.bricksonscreen=0 change scene to next scene. Then drag that actor onto every scene.

    3) In the actor which needs more than 1 hit, create an integer self attribute called hits. Then make a rule that says actor receives event when overlaps or collides with ball, change attribute self.hits to self.hits+1 And then make another rule that says when self.hits=2 (or how many hits you want it to take before it destroys) change attribute bricksonscreen to bricksonscreen-1, change attribute game.score to game.score+10 and last but not least a destroy actor behavior.

    Best of luck,
    Henry Abrams
  • Adam3k3Adam3k3 Member Posts: 11
    Thank you for your quick suport, will see how it goes and let you know should I need more help.

    thanks again.
  • App SurgeApp Surge Member Posts: 651
    Anytime :)
  • Adam3k3Adam3k3 Member Posts: 11
    Im back with more questions:

    1. I triad adding the bricks and changing bricks on screen in attributes but it gets saved from all scenes. I even deleted it in scene but nothing happens.

    2. I would like to have a certain time limit that depends from stage to stage, how to do that?

    3. I would also like to add a death bricks, meaning that the ball dies when touching them.

    I have other questions like menus and cameras but I prefer to ask them once I nearly complete my project.
  • Adam3k3Adam3k3 Member Posts: 11
    Bump
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2012
    2. I would like to have a certain time limit that depends from stage to stage, how to do that?
    If you unlock an actor (after placing it in a scene), you can access the scene attributes which include scene.time. So you could have a control actor (an actor that sits at the edge of the scene and doesn't do anything else) with a rule When scene.time > 15 ... Change Scene. 15 would be the number of seconds that have elapsed.

    I would recommend creating a table that has your levels/scenes as row numbers and then a column called TimeLimit with the number of seconds for each level. Then your rule would be When scene.time > TableCellValue(LevelInfoTable,game.CurrentLevel,"TimeLimit") ... Change Scene.
    3. I would also like to add a death bricks, meaning that the ball dies when touching them.
    You can use a rule that checks When actor collides with [another actor] ... Destroy this actor.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.