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 = {
};
[/QUOTE]
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
[/QUOTE]
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"]
[/QUOTE]
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
HOME
Reply With Quote
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.
