problem deleting all rows
gooner
Lancaster, PAMember Posts: 135
I have an actor btnContinue, when touch is pressed I would like to remove all rows in the specified table and change scene. However, only one row is deleted when the new scene starts.
It's setup as follows:
Rule - actor receives event touch is pressed...
(Inside Rule)
- Loop over table (inside loop I remove row) NOTE: I've tried delete at row index, at beginning and at end.
- Change Scene
I'm guessing it's not completing the loop before Change Scene but not positive. Has anyone done anything similar?
Thank You!
Comments
Well, I don't see a condition that tells the game to change scene when the rows are gone. Right now it looks like it removes one row then changes Scene.
There's an easier way to do it. Create a new blank table and then in your rule copy the new blank table to your current table and then switch scenes. Removes the need for the loop and also solves your problem.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Worked!, many thanks.