Help in spawning another character at the position of the character already on the scene
aimer_s19
Member, PRO Posts: 10
Hey guys I need some help.Cant think of the logic.
I have like 300 same actors placed on the screen and i Want to spawn a new character in place in of one of those actors randomly.
Comments
In the rules for the 300 actors, have each actor store its x and y position in two table cells/columns (increment an integer attribute and use it as the row number).
Then when you want to spawn another actor, choose a random row (self.randomRow) from the table and spawn at x=tableCell(tableName,self.randomRow,1) and y=col tableCell(tableName,self.randomRow,2) .
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's a demo made in Mac Creator. Click anywhere to spawn a new actor.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang Thanks for your help man