collect3DENHistory: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


|arma3|Game name=
|game1= arma3
|version1= 1.56


|1.56|Game version=
|gr1= Eden Editor


|gr1= Eden Editor |GROUP1=
|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.
____________________________________________________________________________________________


| 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. |DESCRIPTION=
{{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">
* {{hl|"\a3\3den\data\cfg3den\history\addtolayer_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\changeattributes_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\changeseat_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\connectitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\create_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\createcomment_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\deleteitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\disconnectitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\makenewlayer_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\missionnew_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\moveitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\multipleoperations_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\pasteitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\removefromlayer_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\rotateitems_ca.paa"}}
* {{hl|"\a3\3den\data\cfg3den\history\scaleitems_ca.paa"}}
</spoiler>


| '''collect3DENHistory''' code |SYNTAX=
|s1= [[collect3DENHistory]] code
|p1= code: [[Code]] |PARAMETER1=
| [[Nothing]] |RETURNVALUE=


|x1= <code>[[collect3DENHistory]] {
|p1= code: [[Code]] - code that is executed in '''[[Scheduler#Unscheduled_Environment|Unscheduled Environment]]'''
_logic = [[create3DENEntity]] ["Logic", "Logic", [[position]] [[player]]];
[[add3DENConnection]] ["Sync", [_logic], [[player]] ];
};</code>
Creates a logic and connects it to player in one history step.
|EXAMPLE1=
____________________________________________________________________________________________


|  
|r1= [[Nothing]]
[[add3DENConnection]]
 
[[create3DENComposition]]
|s2= [text, tooltip, icon] [[collect3DENHistory]] code
[[create3DENEntity]]
 
[[delete3DENEntities]]
|s2since= arma3 2.06
[[do3DENAction]]
 
[[remove3DENConnection]]
|p21= text: [[String]] - text of the entry that is added to the history list
[[set3DENAttributes]]
 
[[set3DENObjectType]]
|p22= tooltip: [[String]] - (Optional, default "Batch Change" ([[isLocalized|localized]])) - tooltip of the entry
|SEEALSO=  
 
|  |MPBEHAVIOUR=  
|p23= 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 {{hl|\}}!'''
____________________________________________________________________________________________
 
}}
|p24= code: [[Code]] - code that is executed in '''[[Scheduler#Unscheduled_Environment|Unscheduled Environment]]'''
 
|r2= [[Nothing]]
 
|x1= <sqf>
collect3DENHistory
{
_logic = create3DENEntity ["Logic", "Logic", position player];
add3DENConnection ["Sync", [_logic], player];
}; // Creates a logic and connects it to player in one history step.
</sqf>


<h3 style='display:none'>Notes</h3>
|x2= <sqf>
<dl class='command_description'>
["Create Entity", "B_Soldier_F", "a3\3den\data\cfg3den\history\create_ca.paa"] collect3DENHistory
<!-- Note Section BEGIN -->
{
<!-- Note Section END -->
create3DENEntity ["Object","B_Soldier_F", screenToWorld [0.5,0.5]];
</dl>
};
<!-- DISCONTINUE Notes -->
</sqf>


|x3= <sqf>
[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
</sqf>


<h3 style='display:none'>Bottom Section</h3>
|seealso= [[add3DENConnection]] [[create3DENComposition]] [[create3DENEntity]] [[delete3DENEntities]] [[do3DENAction]] [[remove3DENConnection]] [[set3DENAttributes]] [[set3DENObjectType]]
{{GameCategory|arma3|New_Scripting_Commands_List}}
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= 7erra
<dd class="notedate">Posted on October 26, 2020 - 01:15 (UTC)</dd>
|timestamp= 20201026011500
<dt class="note">[[User:7erra|7erra]]</dt>
|text= Contrary to other code block structures ([[call]], [[if]]/[[then]]/[[exitWith]], [[switch]]/[[case]]/[[default]], etc.) the code block of [[collect3DENHistory]] will not return any value:
<dd class="note">
<sqf>
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 {
<code>_unit {{=}} [[collect3DENHistory]] {
create3DENEntity ["Object", "C_Protagonist_VR_F", screenToWorld [0.5, 0.5]];
[[create3DENEntity]] ["Object", "C_Protagonist_VR_F", [[screenToWorld]] [0.5, 0.5]];
};
};
_unit {{cc|<null>}}</code>
_unit // <null>
</dd>
</sqf>
</dl>
}}
<!-- DISCONTINUE Notes -->

Latest revision as of 19:43, 3 September 2024

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
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. Must not start with a \!
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
7erra - c
Posted on Oct 26, 2020 - 01:15 (UTC)
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>