collect3DENHistory: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (added new syntax)
(more examples, added default icons. Explained how to skip parameters)
Line 7: Line 7:


|descr= 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.
|descr= 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.
{{Feature|Informative|In order to only change the 2nd or 3rd parameter of the alternative syntax use [[nil]] as the preceding parameters.}}
Some useful icons are:
<spoiler text="Show texture paths">
* <tt>"\a3\3den\data\cfg3den\history\addtolayer_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\changeattributes_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\changeseat_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\connectitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\create_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\createcomment_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\deleteitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\disconnectitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\makenewlayer_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\missionnew_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\moveitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\multipleoperations_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\pasteitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\removefromlayer_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\rotateitems_ca.paa"</tt>
* <tt>"\a3\3den\data\cfg3den\history\scaleitems_ca.paa"</tt>
</spoiler>


|s1= [[collect3DENHistory]] code
|s1= [[collect3DENHistory]] code
Line 16: Line 37:
|s2= [text, tooltip, icon] [[collect3DENHistory]] code {{Since|arma3|2.06|y}}
|s2= [text, tooltip, icon] [[collect3DENHistory]] code {{Since|arma3|2.06|y}}


|p21= text: [[String]] - Text of the entry that is added to the history list
|p21= text: [[String]] - text of the entry that is added to the history list


|p22= tooltip: [[String]] - Tooltip of the entry
|p22= tooltip: [[String]] - (Optional, default "Batch Change" ([[isLocalized|localized]])) - tooltip of the entry


|p23= icon: [[String]] - Path to the icon that is displayed left of the ''text''
|p23= icon: [[String]] - (Optional, default "\a3\3den\data\cfg3den\history\multipleoperations_ca.paa") - path to the icon that is displayed left of the ''text''


|p24= code: [[Code]] - Code that is executed in '''[[Scheduler#Unscheduled_Environment|Unscheduled Environment]]'''
|p24= code: [[Code]] - Code that is executed in '''[[Scheduler#Unscheduled_Environment|Unscheduled Environment]]'''
Line 26: Line 47:
|r2= [[Nothing]]
|r2= [[Nothing]]


|x1= <code>[[collect3DENHistory]] {
|x1= <code>[[collect3DENHistory]]  
{
_logic = [[create3DENEntity]] ["Logic", "Logic", [[position]] [[player]]];
_logic = [[create3DENEntity]] ["Logic", "Logic", [[position]] [[player]]];
[[add3DENConnection]] ["Sync", [_logic], [[player]] ];
[[add3DENConnection]] ["Sync", [_logic], [[player]] ];
}; {{cc|Creates a logic and connects it to player in one history step.}}</code>
|x2= <code>["Create Entity", "B_Soldier_F", "\a3\3den\data\cfg3den\history\create_ca.paa"] [[collect3DENHistory]]
{
  [[create3DENEntity]] ["Object","B_Soldier_F", [[screenToWorld]] [0.5,0.5]];
};</code>
};</code>
Creates a logic and connects it to player in one history step.
 
|x3= <code><nowiki>[</nowiki>[[nil]], [[nil]], "\a3\3den\data\cfg3den\history\moveitems_ca.paa"] [[collect3DENHistory]]
{
  [[create3DENEntity]] ["Object","B_Soldier_F", [[screenToWorld]] [0.5,0.5]];
};{{cc|Change only the icon}}</code>


|seealso= [[add3DENConnection]] [[create3DENComposition]] [[create3DENEntity]] [[delete3DENEntities]] [[do3DENAction]] [[remove3DENConnection]] [[set3DENAttributes]] [[set3DENObjectType]]
|seealso= [[add3DENConnection]] [[create3DENComposition]] [[create3DENEntity]] [[delete3DENEntities]] [[do3DENAction]] [[remove3DENConnection]] [[set3DENAttributes]] [[set3DENObjectType]]

Revision as of 18:03, 15 July 2021

Hover & click on the images for description

Description

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.
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"
Groups:
Eden Editor

Syntax

Syntax:
collect3DENHistory code
Parameters:
code: Code - Code that is executed in Unscheduled Environment
Return Value:
Nothing

Alternative Syntax

Syntax:
[text, tooltip, icon] collect3DENHistory code Template:Since
Parameters:
text: String - 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
code: Code - Code that is executed in Unscheduled Environment
Return Value:
Nothing

Examples

Example 1:
collect3DENHistory { _logic = create3DENEntity ["Logic", "Logic", position player]; add3DENConnection ["Sync", [_logic], player ]; }; // Creates a logic and connects it to player in one history step.
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]]; };// Change only the icon

Additional Information

See also:
add3DENConnection create3DENComposition create3DENEntity delete3DENEntities do3DENAction remove3DENConnection set3DENAttributes set3DENObjectType

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on October 26, 2020 - 01:15 (UTC)
7erra
Contrary to other code block structures (call, if/then/exitWith, switch/case/default, etc.) the code block of collect3DENHistory will not return any value: _unit = collect3DENHistory { create3DENEntity ["Object", "C_Protagonist_VR_F", screenToWorld [0.5, 0.5]]; }; _unit // <null>