Fredrick 0 Posted March 5, 2007 I am trying to find a simple script i can built on that tracks units while a mission is being executed. For example i want it to track how many units\objects are on the map and when an where they where killed. So if anyone has a script template that does something very basic, similar to the example above it would be very helpfull for me. I am not very experienced with Arma editing but i am a experienced c++ coder, and my goal is to build a dynamic campaign generator. I will write the entire generator as a 3rd party software, while i also need some interaction from the game such as units info, position etc. Anything realy basic is apreciated. Fred Share this post Link to post Share on other sites
charonos 0 Posted March 5, 2007 Correct me if i have misunderstood you, you are intending to write a dynamic campaign generator as a 3rd party software for ArmA? I am afraid that this is impossible if you mean to have separate C++ prgrams running besides ArmA. You can only write it in script-syntax to actually interact with ArmA. FYI : There is several people already working on dynamic campaign generators, but don't feel discouraged to go ahead and create something like that, it is always good to add something to the community or just for the fun of it. Share this post Link to post Share on other sites
Fredrick 0 Posted March 5, 2007 Thats right, I will make it parse at ASCII level, compile to the semi binary file format pbo The missions might not run in sequence, you are probaly right about that, the user has to probaly run the missions from the single player missions and go in and out of the list to see it regenerate. My initial testings verified that Arma redraws the mission list ingame, not during the ArmaOnInit() Fred Share this post Link to post Share on other sites
UNN 0 Posted March 6, 2007 Quote[/b] ]For example i want it to track how many units\objects are on the map and when an where they where killed. Read this thread until the end, then decide for yourself: Data Storage Share this post Link to post Share on other sites
Fredrick 0 Posted March 6, 2007 Intresting, the method i will attempt after reading that thread would be: Using the ARAM.RPT error log. I will write some test code that removes the unwanted data and dumps it in its format while deleting the RPT file. Share this post Link to post Share on other sites
Fredrick 0 Posted March 6, 2007 I executed your script succesfully but cant find the logg file <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // Start  gen.sqs _EndTime=Time+20; WaitUntil    {    _Null=Format ["Time:%1 Pos:%2 Dir:%3",Time,GetPos Player,GetDir Player] CreateVehicle [0,0,0];    Sleep 0.01;    (Time>_EndTime)    }; Hint "Done"; // End Where should it be located, what have i missed? Share this post Link to post Share on other sites
UNN 0 Posted March 6, 2007 Make sure you set your PC to display hidden files and folders, then look under your user name in Documents and Settings: Quote[/b] ]C:\Documents and Settings\<Your user name in XP>\Local Settings\Application Data\ArmA Share this post Link to post Share on other sites
Fredrick 0 Posted March 6, 2007 Great, works perfect for what i need! Thanks Share this post Link to post Share on other sites
Fredrick 0 Posted March 7, 2007 For anyone having hard time starting writing a parser, perhaps this example is of some help. Examples: www.franva.org/Parser.rar Binary example with RTF example. run Parser.exe from the same dir as RTF is. www.franva.org/Parser_Source.rar complete source code + arma files. Share this post Link to post Share on other sites