For example every wave a number and type of enemies will come. Like in plants vs zombies
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
One way to do this is to read through the columns of a table using Loop Over Table and have each row stand for a particular level. So if your table looked like this:
1 0 0 0 0
1 1 0 0 0
2 0 1 0 0
It might mean to spawn 1 easy enemy on level 1, 1 easy and 1 medium on level 2, and 2 easy and 1 hard on level 3.
When each level starts, you would increase game.level (an integer) by one and then use that as the row value in your table expressions.
Start trigger: Game start with or without delay (timer)
First wave
spawn defined amount and type of enemies, lets say 10
I have a game variable like Enemies Killed which i increased with each killed enemy
and if a certain threshold is reached, lets say 10 for this example, i do a new event as a small break or spawning another/next wave.
@tatiang could you send me a screenshot of the code required.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
@SEMA I don't have the rules set up but it would require using Loop Over Table to loop through the column values using game.level as the row value. So the current spawner data (integer) would be something like this:
Comments
Could you give a little more details on what you're trying to do?
Mental Donkey Games
Website - Facebook - Twitter
For example every wave a number and type of enemies will come. Like in plants vs zombies
One way to do this is to read through the columns of a table using Loop Over Table and have each row stand for a particular level. So if your table looked like this:
1 0 0 0 0
1 1 0 0 0
2 0 1 0 0
It might mean to spawn 1 easy enemy on level 1, 1 easy and 1 medium on level 2, and 2 easy and 1 hard on level 3.
When each level starts, you would increase game.level (an integer) by one and then use that as the row value in your table expressions.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@SEMA
i do it like this
Start trigger: Game start with or without delay (timer)
First wave
spawn defined amount and type of enemies, lets say 10
I have a game variable like Enemies Killed which i increased with each killed enemy
and if a certain threshold is reached, lets say 10 for this example, i do a new event as a small break or spawning another/next wave.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
thank you guys
@tatiang could you send me a screenshot of the code required.
@SEMA I don't have the rules set up but it would require using Loop Over Table to loop through the column values using game.level as the row value. So the current spawner data (integer) would be something like this:
tableCellValue(tableName, game.level, self.loopIndex)
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
It spawn the actor based on the amount of columns I have, but i can't get them to spawn correctly.