How can I have the same object in many levels to be specific by level ? Thanks for your help !

lavoiesvfxlavoiesvfx Member, PRO Posts: 51

Hello Guys,
I would like in my game a ball recovers Bonus. But the same ball appears in several levels. So if I change the speed as exemple on my ball it will change on all levels where it appears. But I don't want ! I want the parameters to be specific by level.
How do I do ! For now I'm creating the same objects per Levels but it becomes really hard to find objects because I have a lot.
You'll find I am at my beginning in game design :-(
Thanks for your time !

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Create a table where each row has the speed for that level (e.g. row 1 would be the speed for level 1, row 2 the speed for level 2, etc.). Have a game attribute that stores the level number.

    In the ball actor, move it using tableCellValue(tableName, game.level, 1) for the speed. Then increase the value of game.level each time you change levels in the game.

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

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @tatiang said:
    Create a table where each row has the speed for that level (e.g. row 1 would be the speed for level 1, row 2 the speed for level 2, etc.). Have a game attribute that stores the level number.

    In the ball actor, move it using tableCellValue(tableName, game.level, 1) for the speed. Then increase the value of game.level each time you change levels in the game.

    @tatiang

    Is there any good tutorials about the table? It seems a good way to raise the difficulty in game. So this is the way to do instead of duplicating same object all around with different parameters? Right !
    Thanks for your time !
    Cheers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited May 2017

    Yes, use tables with a single prototype actor. For almost anything GameSalad related, I usually Google gamesalad < term > and watch the videos or read through the tutorials. So I recommend starting by Googling gamesalad tables.

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

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @tatiang said:
    Yes, use tables with a single prototype actor. For almost anything GameSalad related, I usually Google gamesalad < term > and watch the videos or read through the tutorials. So I recommend starting by Googling gamesalad tables.

    @tatiang
    Thanks so much ! I have started listening some of them.

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @lavoiesvfx said:

    @tatiang said:
    Create a table where each row has the speed for that level (e.g. row 1 would be the speed for level 1, row 2 the speed for level 2, etc.). Have a game attribute that stores the level number.

    In the ball actor, move it using tableCellValue(tableName, game.level, 1) for the speed. Then increase the value of game.level each time you change levels in the game.

    @tatiang

    Is there any good tutorials about the table? It seems a good way to raise the difficulty in game. So this is the way to do instead of duplicating same object all around with different parameters? Right !
    Thanks for your time !
    Cheers

    @tatiang

    I tried to figure out how to do it in the Table and after bringing using the attribute as you mention.
    In my scenes I have the same ball. But in all the scenes the ball is colliding to one new main object. And same Ball gets some same coins in many levels.
    I draw an exemple.
    I don't have your knowledge and if you can show me how to create the table and how I get that to the attribute.
    I'm really novice in GS.
    Thanks for your time !

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Well, if you're using different actors for collision, then you can't do that part with a table. You'll need a collision rule for each actor.

    But for the speed, it would look like the attached demo.

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

  • lavoiesvfxlavoiesvfx Member, PRO Posts: 51

    @tatiang said:
    Well, if you're using different actors for collision, then you can't do that part with a table. You'll need a collision rule for each actor.

    But for the speed, it would look like the attached demo.

    @tatiang
    Thanks for your scene !
    I will try on my side to replicate your setup and let you know how it goes.

Sign In or Register to comment.