rucker.mark 2 Posted July 10, 2021 I'm trying to create a mission that will automatically restart at the end of the mission and only has AI controlled units. Basically I'm trying to use Arma as a simulator. Does anyone know if this is possible? Creating a mission with only AI controlled units is easy enough but getting the mission to restart and play again on its own at the end is proving to be much harder. I'd really like it if this could be done locally but I'm open to using a dedicated server with a custom configuration (something like mission rotation and skip the lobby, though that didn't work for me). Share this post Link to post Share on other sites
Rydygier 1309 Posted July 10, 2021 Welcome to the BI Forums! I never tried such thing, I know, there are: https://community.bistudio.com/wiki/playMission https://community.bistudio.com/wiki/playScriptedMission but no idea, if/how they work exactly. There's also: https://community.bistudio.com/wiki/runInitScript but this does not exactly that. Question is, do you really need to actually restart the mission. Maybe just try resetting everything to initial conditions within same mission (in such case best, if everything is placed/initialized via SQF script). If this is about repetitive simulating something, such solution should suffice (and you don't need any multiplayer set up for it, just plain, local singleplayer). But depends, what exactly you're trying to do. Share this post Link to post Share on other sites
rucker.mark 2 Posted July 10, 2021 Thanks! Yeah I've tried the top two commands without any luck and had briefly considered your final idea though didn't try it. I hadn't seen runInitScript. I think your last idea is a really good idea one and I need to experiment with it more. Given my lack of success with other methods it's probably my best bet and might work well with runInitScript. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 10, 2021 https://community.bistudio.com/wiki/serverCommand Use #restart Share this post Link to post Share on other sites
rucker.mark 2 Posted July 10, 2021 One of my coworkers said they had tried #restart and it hadn't worked for them... Have you used it before with success? Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 10, 2021 Yes. At least I did something similar some years ago. The bad thing is that you need a server.cfg file to get it work: Share this post Link to post Share on other sites
rucker.mark 2 Posted July 16, 2021 Oh yeah, I didn't have a server.cfg. I tested it myself after your recommendation (and to make sure my coworker hadn't made a mistake). It didn't seem to work so that was probably why. In the end the solution I went with was to setup the mission how I wanted then run export to sqf to get a script that created the mission. I then wrote a script that removed all entities from the game (this was a little tricky but I got there.) Then I added a trigger that activated on the mission completion condition and ran both the script to clear the map and the script to create the mission. This allows the mission to replay over and over again with ever actually leaving the mission. 2 Share this post Link to post Share on other sites