addCuratorEditableObjects: Difference between revisions

From Bohemia Interactive Community
m (remove the insane indentation from note code)
No edit summary
 
(44 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 1.16
|1.16


|serverExec= server
|serverExec= server
Line 9: Line 8:
|gr1= Curator
|gr1= Curator


| Register objects which can be edited by a curator.
|descr= Register objects which can be edited by a curator.


| curatorObj [[addCuratorEditableObjects]] [objects, addCrew]
|s1= curatorObj [[addCuratorEditableObjects]] [objects, addCrew]


|p1= '''curatorObj''': [[Object]] - Curator module.
|p1= curatorObj: [[Object]] - curator module


|p2= '''objects''': [[Array]]
|p2= objects: [[Array]]
   
   
|p3= '''addCrew''': [[Boolean]]
|p3= addCrew: [[Boolean]]


| [[Nothing]]
|r1= [[Nothing]]


|x1= <code>MyCuratorModule [[addCuratorEditableObjects]] <nowiki>[[</nowiki>MyCar], [[true]]<nowiki>]</nowiki>;</code>
|x1= <sqf>MyCuratorModule addCuratorEditableObjects [[MyCar], true];</sqf>


| [[Arma 3: Curator]], [[allCurators]], [[removeCuratorEditableObjects]], [[curatorEditableObjects]]
|seealso= [[Arma 3: Curator]] [[allCurators]] [[removeCuratorEditableObjects]] [[curatorEditableObjects]]
}}
}}


{{Note
|user= R3vo
|timestamp= 20200723102900
|text= To continuously make all created objects editable for all Zeus use the following code:
<sqf>
if (isServer) then
{
0 spawn
{
while { true } do
{
{
_x addCuratorEditableObjects
[
entities [[], ["Logic"], true /* include vehicle crew */, true /* exclude dead bodies */],
true
];
} count allCurators;
sleep 60; // change to whatever fits your needs
};
};
};
</sqf>
}}


{{GameCategory|arma3|New Scripting Commands}}
{{Note
{{GameCategory|arma3|Scripting Commands}}
|user= POLPOX
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|timestamp= 20250612110549
 
|text= Modernized script of R3vo's concept for efficient solution.
 
<sqf>if (isServer) then {
<!-- CONTINUE Notes -->
addMissionEventHandler ["EntityCreated",{
<dl class="command_description">
{  
<dd class="notedate">Posted on July 23, 2020 - 10:29 (UTC)</dd>
_x addCuratorEditableObjects [  
<dt class="note">[[User:R3vo|R3vo]]</dt>
[_this], true  
<dd class="note">
];  
To continuously make all created objects editable for all Zeus use the following code:
} forEach allCurators;  
<code>[[if]] [[isServer]] [[then]]
}];  
{
};</sqf>
  [] [[spawn]]
}}
  {
    [[while]] {[[true]]} [[do]]
    {
      {
        _x [[addCuratorEditableObjects]]
        [
            [[entities]] [[],["Logic"],[[true]] /*Include vehicle crew*/,[[true]] /*Exclude dead bodies*/],
            [[true]]
        ];
      } [[count]] [[allCurators]];
      [[sleep]] 60; [[a / b|/]]/Change [[to]] whatever fits your needs
    };
  };
};</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 13:05, 12 June 2025

Hover & click on the images for description

Description

Description:
Register objects which can be edited by a curator.
Groups:
Curator

Syntax

Syntax:
curatorObj addCuratorEditableObjects [objects, addCrew]
Parameters:
curatorObj: Object - curator module
objects: Array
addCrew: Boolean
Return Value:
Nothing

Examples

Example 1:
MyCuratorModule addCuratorEditableObjects [[MyCar], true];

Additional Information

See also:
Arma 3: Curator allCurators removeCuratorEditableObjects curatorEditableObjects

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
R3vo - c
Posted on Jul 23, 2020 - 10:29 (UTC)
To continuously make all created objects editable for all Zeus use the following code:
if (isServer) then { 0 spawn { while { true } do { { _x addCuratorEditableObjects [ entities [[], ["Logic"], true /* include vehicle crew */, true /* exclude dead bodies */], true ]; } count allCurators; sleep 60; // change to whatever fits your needs }; }; };
POLPOX - c
Posted on Jun 12, 2025 - 11:05 (UTC)
Modernized script of R3vo's concept for efficient solution.
if (isServer) then { addMissionEventHandler ["EntityCreated",{ { _x addCuratorEditableObjects [ [_this], true ]; } forEach allCurators; }]; };