preloadObject: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 16: | Line 16: | ||
|p1= distance: [[Number]] - distance at which preload the object |PARAMETER1= | |p1= distance: [[Number]] - distance at which preload the object |PARAMETER1= | ||
|p2 = object: [[Object]] - existing object | |p2 = object: [[Object]] - existing object |PARAMETER2= | ||
| [[Boolean]] - [[true]] when preload is finished |RETURNVALUE= | | [[Boolean]] - [[true]] when preload is finished |RETURNVALUE= | ||
Line 24: | Line 24: | ||
|p21= distance: [[Number]] - distance at which preload the object |PARAMETER21= | |p21= distance: [[Number]] - distance at which preload the object |PARAMETER21= | ||
|p22 = classname: [[String]] - classname of the object | |p22 = classname: [[String]] - classname of the object |PARAMETER22= | ||
| r2 = [[Boolean]] - [[true]] when preload is finished|RETURNVALUE= | | r2 = [[Boolean]] - [[true]] when preload is finished|RETURNVALUE= |
Revision as of 19:24, 24 September 2020
Description
- Description:
- Preloads all textures, materials and proxies needed to render given object. Works with both class names and objects. Returns true once all data is loaded and ready.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- distance preloadObject object
- Parameters:
- distance: Number - distance at which preload the object
- object: Object - existing object
- Return Value:
- Boolean - true when preload is finished
Alternative Syntax
- Syntax:
- distance preloadObject classname
- Parameters:
- distance: Number - distance at which preload the object
- classname: String - classname of the object
- Return Value:
- Boolean - true when preload is finished
Examples
- Example 1:
[] spawn { waitUntil {10 preloadObject "SoldierW"}; hint "Preload finished"; };
- Example 2:
[] spawn { waitUntil {10 preloadObject leader player}; hint "Preload finished"; };
Additional Information
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