Delete actor and table entry of actor's spawn location?
jsorr2
Member Posts: 279
I've written locations of actors in a table to spawn in the game. (e.g. Actor 1 x=100, y= 250. Actor 2 x=150, y=300)
I don't know how to make it so when the player touches the actor, remove the specific actor (and not all that are similar) from the scene and its unique row in the table, so when the game resets its gone forever?
Answers
How about just deleting the row? Let me make you a quick demo.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang Thanks for the upcoming Demo. I allow players to spawn actors into the game, by adding rows into the table and then setting the columns information based on the actors current position. I also have existing rows (row 1 to 9) filled with actors positions that already exist in the game. Therefore, I allow the player to destroy actors in the game forever, and spawn in actors, which they can destroy as well. So I'm not sure how to find the correct row in the table based off the current actors position and then delete that row.
Here you go.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang
EDIT: I got it working. fantastic! thank you