setObjectScale: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix return value) |
Waffle SS. (talk | contribs) No edit summary |
||
Line 31: | Line 31: | ||
|seealso= [[getObjectScale]] | |seealso= [[getObjectScale]] | ||
}} | |||
{{Note | |||
|user= Waffle SS. | |||
|timestamp= 20211223062941 | |||
|text= For those interested in the extra cursed, you can scale non-simple objects by running the command every frame. | |||
The multiplayer performance of this is likely terrible. | |||
<code>[[addMissionEventHandler]] ["EachFrame", { | |||
{ | |||
if (_x != [[player]]) [[then]] { _x setObjectScale 0.5; }; | |||
} [[forEach]] [[allUnits]]; | |||
}];</code> | |||
}} | }} |
Revision as of 07:29, 23 December 2021
Description
- Description:
- Scales an attached object or a Simple Object's model.
- Problems:
- The Arma 3 LOD limits still apply, meaning walk-able surfaces can only be X m in size, and collision in general will only work up to X m from object center. This command works on all objects in Eden Editor or scenario preview, but it will not save and will reset when objects get moved. Eden Editor support is only intended for artists. Setting the scale of actively simulated objects (vehicles with players/AI in them) is possible, but not officially supported, you may encounter issues.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- object setObjectScale scale
- Parameters:
- object: Object - Must be either an attached object or Simple Object
- scale: Number - Limited to 0.0001 to 65504, relative to the object model's normal scale
- Return Value:
- Nothing
Examples
- Example 1:
_mrap attachTo [player,[0,0,0]]; _mrap setObjectScale 0.1;
- Example 2:
// Select an object in Eden Editor and execute the following code in the Arma 3: Debug Console. When moving the object, the effect is reset! (get3DENSelected "Object" # 0) setObjectScale 0.1;
Additional Information
- See also:
- getObjectScale
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 Dec 23, 2021 - 06:29 (UTC)
-
For those interested in the extra cursed, you can scale non-simple objects by running the command every frame.
The multiplayer performance of this is likely terrible.
addMissionEventHandler ["EachFrame", { { if (_x != player) then { _x setObjectScale 0.5; }; } forEach allUnits; }];