preloadObject: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]OFP[ _]Elite *(\|.*)?\]\]" to "{{GameCategory|ofpe|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma1 |Game name= | | arma1 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Object Manipulation |GROUP1= | |gr1= Object Manipulation |GROUP1= | ||
| 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.<br><br> | | 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.<br><br> | ||
{{Important | At least one object of the given classname has to be present in the current mission in order for alternative syntax version of the command to have any effect}}|DESCRIPTION= | {{Important | At least one object of the given classname has to be present in the current mission in order for alternative syntax version of the command to have any effect}}|DESCRIPTION= | ||
| distance '''preloadObject''' object |SYNTAX= | | distance '''preloadObject''' object |SYNTAX= | ||
Line 27: | Line 24: | ||
| r2 = [[Boolean]] - [[true]] when preload is finished |RETURNVALUE2= | | r2 = [[Boolean]] - [[true]] when preload is finished |RETURNVALUE2= | ||
|x1= <code>[] [[spawn]] | |x1= <code>[] [[spawn]] | ||
Line 39: | Line 35: | ||
[[hint]] "Preload finished"; | [[hint]] "Preload finished"; | ||
};</code>|EXAMPLE2= | };</code>|EXAMPLE2= | ||
| [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]]|SEEALSO= | | [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]]|SEEALSO= |
Revision as of 02:16, 17 January 2021
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
Notes
Bottom Section
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Command Group: Object Manipulation
- Operation Flashpoint: Elite: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands