Spawn Actor using Table data as attributes: Looking for hints
Hello
I've used tables to store text and then randomly read from columns in the past in an app. Basic stuff.
I need to "kick it up a notch" for a new app. I have stored several rows and columns of data, in which the columns hold a stage name, an actor name, x coordinates, y coordinates, and a boolean that determines whether the actor has been killed (or not).
The logic should be something like this:
I should have an event handler actor with a rule that if the player is entering stage 1, read the (for example) five rows pertaining to stage 1 to see which actors are not killed, and spawn actors 1 through 5 at the proper x,y coordinates.
If during the course of the stage an actor is killed, write on the table that the actor is killed off, so it does not spawn next time the player revisits stage 1.
From a logic point of view, it sounds pretty straightforward, but when trying to spawn an actor at x,y I encountered problems. Just to test the table, I had an event handler simply spawn Actor1 with the data from the first row of the table, but the actor did not spawn. Any idea at this moment what did I do wrong? If I can't get the actor to spawn under the simplest of terms, then forget about the entire logic process.
Thanks,
Marcos
Comments
Yep, your code is not right yet. You are on the right track with your approach as outlined above though.
Post a screenshot of the behaviours in your event handler, and those in the spawned actor.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com