How do I extract the traces of a player

Get help using Construct 2

Post » Mon Mar 31, 2014 11:08 pm

After a playing session ( using a game created in construct2) i want to extract the traces made by the player ( path he/she took in the game, list of actions, respones , how many times he/she communicate with NPC ,...) in a log file or in an XML file or even in a database.
Is it possible to tell me how to achieve that? Is it possible to create a small tuto to demonstrate how it works since i'm still new to construct.

Your answers will really mean alot to me since it will help me in my work progress. Thx in advance
B
4
Posts: 11
Reputation: 218

Post » Tue Apr 01, 2014 2:37 am

Well this doesn't include an example. But you could start by just making a sprite move randomly around the screen and every time you tell it to move to a new position, you can store the new location in a list or array. So it is possible and shouldn't be much more difficult to do, than to make the player do them in the first place.

But maybe I misunderstood what you meant.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Apr 01, 2014 9:37 am

For every action taken, post a new line to a log "text" plugin maybe? You just have to add a new action for every thing you want logged. "User hits space", "sprite attacks" "add text 'user attacks'" for example.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Tue Apr 01, 2014 2:10 pm

Thank you both your answers i really appreciate it.

@nimos100 i want to collect the player's traces after a playing session in order to work on it later on.
@roracle if u dont mind can u explain to me more your idea and is there an online example that show how your idea works. I'm sorry but i'm just a beginner in construct. thanks in advance
B
4
Posts: 11
Reputation: 218

Post » Tue Apr 01, 2014 2:20 pm

If you add a text object, in its properties you can turn it into a textarea, then you can use the append text, each time you want to track something.

It might be easier to just use a list object and use the additem functionality that comes with that. You can find description of both in the manual.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Apr 01, 2014 6:23 pm

@nimos again thx for ur answer i do really appreciate it.

I just read about list object but i guess it doesnt do the job (of course if i did understand correctly).
what i want exactly is : after a player finished the game i find a text/xml file contains FOR EXAMPLE:

score :100
number of killed enemies : 10
visited area : area1, area2...
path: ....
and so on because i will need to work on these traces later on. hope u get my point.
Again thx alot for your help
B
4
Posts: 11
Reputation: 218

Post » Tue Apr 01, 2014 6:26 pm

No the list or textarea will only keep track of the data for you during the game, as the game end you have to export that information, either to an XML file or some other method depending on what is possible.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Apr 01, 2014 9:15 pm

i see . Is there any methods to have the results like the way i want? bcs i'm trying to not make the player aware of the tracking process in order to not affect the way he/she plays. Besides i'm planing to put the game on a server. That's why i want commands or actions in construct that keep traces automatically in a text file or so then all i need is to work on the traces stored.
Thanks again for ur support
B
4
Posts: 11
Reputation: 218


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests