Jump to content
Sign in to follow this  
boom!

Saving custom events to a log file and then repalying them as a debriefing

Recommended Posts

I know I am probably jumping in the deep end but any pointers would be helpful.

I have a MP mission which I would like the server to save certain events to a log file and then when the mission is over replay the events adding markers to the map.

I have cruised through the 35 pages in this forum but can't seem to find anything similar.

1. Is there a way to save custom events to a log file?

2. (Couldn't find anything about ^). Could I create a player (an object) and save custom events to it's diaryrecord and then get these back at a later date?

3. I am fairly confident I can create the neccessary 'playback' map with the markers, if only I could find a way of saving the events. The events are not the usual EventHandles and in fact already have scripts asscociated with them. Such as building a barracks, a town being captured etc...)

I imagine the 'playback' that used to happen in Civilisation...(long time ago!)

Would really appreciate any pointers.:confused::headscratch:

boom!

Share this post


Link to post
Share on other sites

Why not just write it to an array? No need for a complicated mechanism, just create a array and whatever has to be logged, write a subarray and store it into the main array.

Creating array at mission start:

missionlog = [];

Collecting data and write it to the missionlog:

_logentry = [var1, var2, markername, "any text", mission_time];
missionlog = missionlog + [_logentry];

As new array entries are added at the end, it will be chronological, so no need to care about this.

Sidenote:

This here is addon config and scripting section. Would get more response when posting it in mission editing & scripting part.

Share this post


Link to post
Share on other sites

Myke,

Thanks for the reply.

Yes, was a bit unsure of where to post (can it be moved I don't want to double post)?

Thanks for the array suggestion. I will certainly look into that. My only concern is the memory it might take up.

I will try out your suggestion today and see what I come up with.

Thanks again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×