How can I have the same object in many levels to be specific by level ? Thanks for your help !
lavoiesvfx
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
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
@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
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
@tatiang
Thanks so much ! I have started listening some of them.
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 !
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
@tatiang
Thanks for your scene !
I will try on my side to replicate your setup and let you know how it goes.