Using tables to set up a scene
GamingtilDawn
Member Posts: 104
I think this is possible, I just want to ask for some help.
I have a table with 2 columns and 60 rows. Column 1 is an integer for X and Column 2 is an integer for Y. Each row has a different X and Y coordinate. I am trying to find out how can I call that table into a scene to place an actor at each of specified points.
Comments
You would use the Loop over Table behavior and place a Spawn Actor behavior inside of the loop and then use the loop counter attribute in the tableCellValue() expressions for the x and y positions in the Spawn Actor behavior.
I modified a demo I made before that behavior was added to GameSalad. See attached.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you @tatiang for the response and demo.
Tables are one thing that I just cant seem to completely understand in GS. I was looking at your demo and two things that are confusing me are:
My last question and sorry for so many. Does a destroy behavior on the actor that I am spawning effect my table in anyway? Example, if I destroy an actor will it appear right away (which i dont want) or will it know to wait until the game is reset?