Description
Execute a block of code in which all Eden Editor operations will be recorded as one history step. For example creating an entity, setting its attributes and then connections would normally be recorded as three different steps. Calling them all within single collect3DENHistory block will group them together and the user will need to undo only once to revert the changes. Use ignore3DENHistory to ignore history entry creation.
Note
In order to only change the 2nd or 3rd parameter of the alternative syntax use nil as the preceding parameters.
Some useful icons are:
"\a3\3den\data\cfg3den\history\addtolayer_ca.paa"
"\a3\3den\data\cfg3den\history\changeattributes_ca.paa"
"\a3\3den\data\cfg3den\history\changeseat_ca.paa"
"\a3\3den\data\cfg3den\history\connectitems_ca.paa"
"\a3\3den\data\cfg3den\history\create_ca.paa"
"\a3\3den\data\cfg3den\history\createcomment_ca.paa"
"\a3\3den\data\cfg3den\history\deleteitems_ca.paa"
"\a3\3den\data\cfg3den\history\disconnectitems_ca.paa"
"\a3\3den\data\cfg3den\history\makenewlayer_ca.paa"
"\a3\3den\data\cfg3den\history\missionnew_ca.paa"
"\a3\3den\data\cfg3den\history\moveitems_ca.paa"
"\a3\3den\data\cfg3den\history\multipleoperations_ca.paa"
"\a3\3den\data\cfg3den\history\pasteitems_ca.paa"
"\a3\3den\data\cfg3den\history\removefromlayer_ca.paa"
"\a3\3den\data\cfg3den\history\rotateitems_ca.paa"
"\a3\3den\data\cfg3den\history\scaleitems_ca.paa"
Syntax
Syntax 1
collect3DENHistory code
Parameters:
Returns: Nothing
Syntax 2
since arma3 2.06
[text, tooltip, icon] collect3DENHistory code
Parameters:
text: String or Nothing - text of the entry that is added to the history list
tooltip: String - (Optional, default "Batch Change" (localized)) - tooltip of the entry
icon: String - (Optional, default "a3\3den\data\cfg3den\history\multipleoperations_ca.paa") - path to the icon that is displayed left of the text. Must not start with a \!
code: Code - code that is executed in Unscheduled Environment
Returns: Nothing
Examples
Example 1
collect3DENHistory
{
_logic = create3DENEntity ["Logic", "Logic", position player];
add3DENConnection ["Sync", [_logic], player];
};
Example 2
["Create Entity", "B_Soldier_F", "a3\3den\data\cfg3den\history\create_ca.paa"] collect3DENHistory
{
create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];
};
Example 3
[nil, nil, "a3\3den\data\cfg3den\history\moveitems_ca.paa"] collect3DENHistory
{
create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];
};
See also
ignore3DENHistory · add3DENConnection · create3DENComposition · create3DENEntity · delete3DENEntities · do3DENAction · remove3DENConnection · set3DENAttributes · set3DENObjectType