preloadObject: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| 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}} | {{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}} | ||
| distance '''preloadObject''' object | | distance '''preloadObject''' object | ||
|p1= distance: [[Number]] - distance at which preload the object | |p1= distance: [[Number]] - distance at which preload the object | ||
|p2 = object: [[Object]] - existing object | |p2 = object: [[Object]] - existing object | ||
| [[Boolean]] - [[true]] when preload is finished | | [[Boolean]] - [[true]] when preload is finished | ||
|s2 = distance '''preloadObject''' classname | |s2 = distance '''preloadObject''' classname | ||
|p21= distance: [[Number]] - distance at which preload the object |PARAMETER21= | |p21= distance: [[Number]] - distance at which preload the object |PARAMETER21= | ||
Line 23: | Line 23: | ||
|p22 = classname: [[String]] - classname of the object |PARAMETER22= | |p22 = classname: [[String]] - classname of the object |PARAMETER22= | ||
| r2 = [[Boolean]] - [[true]] when preload is finished | | r2 = [[Boolean]] - [[true]] when preload is finished | ||
|x1= <code>[] [[spawn]] | |x1= <code>[] [[spawn]] | ||
Line 29: | Line 29: | ||
[[waitUntil]] {10 [[preloadObject]] "SoldierW"}; | [[waitUntil]] {10 [[preloadObject]] "SoldierW"}; | ||
[[hint]] "Preload finished"; | [[hint]] "Preload finished"; | ||
};</code> | };</code> | ||
|x2= <code>[] [[spawn]] | |x2= <code>[] [[spawn]] | ||
{ | { | ||
[[waitUntil]] {10 [[preloadObject]] [[leader]] [[player]]}; | [[waitUntil]] {10 [[preloadObject]] [[leader]] [[player]]}; | ||
[[hint]] "Preload finished"; | [[hint]] "Preload finished"; | ||
};</code> | };</code> | ||
| [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]] | | [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]] | ||
}} | }} |
Revision as of 01:12, 18 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
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