sbsmac 0 Posted December 17, 2006 If you do a lot of messing around with scripts and functions, you might find this useful.... First, you can run ArmA in windowed mode using the -window flag. This lets you run your favourite text editor at the same time, allowing you to easily alt-tab between ArmA, editor and any other applications you have up. This seems to be a lot less prone to CTD than full-screen mode. You can also use the -x and -y flags to specify resolution. Next, ArmA appears to have much better handling of script files than I remember from OFP. Ie, scripts are loaded from disk every time they are called meaning it's much easier to tweak them without leaving the editor. (In OFP, scripts were access-locked once the mission started.) You can also place multiple functions in a single file and call them with user-actions. Ie you can write a function file called "function.sqf" :- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> func1 = { call func2; call func3; }; func2 = { }; func3 = { }; then write a script to load this up and run it "try_function.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> call compile preprocessFile "function.sqf"; hint "calling function..." call func1 Finally, place a player unit on the map and just add an action to the initialization field:- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> player addAction ["try function","try_function.sqs"] You can then modify the function on the fly in your favourite text editor and alt-tab back to ArmA to see how it works by calling it from the action menu. Hope someone finds this helpful... :-) mac Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted December 18, 2006 In OFP, scripts were access-locked once the mission started. No they aren't. I've made use of this several times in ofp scripting. The windowed mode thing might be nice to try out though. otherwise, ARMA has to load textures and stuff again every time you go into the mission. Share this post Link to post Share on other sites
sbsmac 0 Posted December 18, 2006 Hmm, I may be misremembering this - it's been a long time. Possibly I'm thinking back to 1.91. The behaviour I remember was that the script files were locked once you entered the mission so if you wanted to modify them you had to leave the mission and reload it from the editor. In ArmA you don't even have to leave the preview mode - you can modify the scripts whilst preview is running. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted December 18, 2006 You could in ofp too. The only limitation with that in OFP: the script had to be loaded after the file was saved. If you have some kind of management script that started at mission start, and kept running indefinatly, you wouldn't see a change in that until the mission restarted. If you had a script that was called once something happens, it would read any changes you made to the file beforehand. Examples: Doesn't work: Suppose you have a script that starts at mission startup and monitors a town for a change in who controls it. Editing the script and tabbing back into the game does nothing since the script is already in memory as it was. Does work: Suppose you have a script that's called by event handler everytime someone with that eventhandler dies. If you change the script, tab back into the game, and kill someone with this event handler, the new version is called. Also, preprocessed functions don't work either as they are loaded into memory at mission start. I suppose that this is all 90% irrelevent now that arma is the primary tool for most of us die hards anyways. Share this post Link to post Share on other sites
rwillis 0 Posted December 19, 2006 where do I put the -window flag to make the game run in windowed mode? Share this post Link to post Share on other sites
sbsmac 0 Posted December 19, 2006 Right click on the 'Armed Assault' icon on your desktop. Select 'properties'. On the 'shortcut' tab change the 'target' to something like this:- Quote[/b] ]"C:\program files\Bohemia Interactive\ArmA\ARMA.EXE" -nosplash -window -x 1024 -y 768 Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted December 19, 2006 Personally, I can't get the X= and Y= to work in a shortcut. Still, I've found windowed mode to be an invaluable time saver when testing scripts. As long as I don't have to take part in any fighting, at least not when vulnerable. Windowed mode is just a little blurry and shrunken, so there's no way I could really play like that. Thanks again for pointing out that windowed mode is a good thing for editing sbsmac. Share this post Link to post Share on other sites
lethal 0 Posted December 20, 2006 Thanks again for pointing out that windowed mode is a good thing for editing sbsmac. I second that. I was unaware of the parameter and it's been a pain alt-tabbing in and out of fullscreen every time i wanted to make a little adjustment Share this post Link to post Share on other sites