Recording the position of actor for x amount of time
Hi All,
Does anyone know a way in which I can record the movement of an actor, so that I can replay it at a later date.
I have an actor which the user moves around the screen. When it's moving I want to record the actors position, so that when it stops I can press a button (or something happens) and it replays.
I thought of constantly updating a table with it's XY position, but I am not sure about this for 2 reasons:
1. can you add more rows to a table from within an actor (as the length of the recording could change so I would not know how may rows in the table I would need.
2. I am not sure how this would be implemented yet.
Thanks
Does anyone know a way in which I can record the movement of an actor, so that I can replay it at a later date.
I have an actor which the user moves around the screen. When it's moving I want to record the actors position, so that when it stops I can press a button (or something happens) and it replays.
I thought of constantly updating a table with it's XY position, but I am not sure about this for 2 reasons:
1. can you add more rows to a table from within an actor (as the length of the recording could change so I would not know how may rows in the table I would need.
2. I am not sure how this would be implemented yet.
Thanks
Best Answer
-
simo103 Posts: 1,331
@robert.mccarthy ... tables are not yet writable but will be soon and I would imagine that will make what you want to do very possible as I would imagine it would either add rows/columns or you could import an empty csv file with hundreds (thousands) of rows already created.
Otherwise you could spawn tiny invisible actors in the path of travel and have the Actor recreate the movement by following that invisible path again.
Answers
Thanks
I noticed I can only create up to 999.. but the game will create over 1000. Will it actually be able to save the info after 999?
I wanted to allow the player to save the table so they can play it whenever they want.
I am not too sure. I have a question just posted asking if you can spawn/create tables on the fly in the app too.
I think this is one for the more experienced GS'ers
Cheers