preloadObject: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (note) |
m (template:command argument fix) |
||
Line 8: | Line 8: | ||
| 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}}|DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| distance '''preloadObject''' object |= | | distance '''preloadObject''' object |SYNTAX= | ||
|p1= distance: [[Number]] - distance at which preload the object |= | |p1= distance: [[Number]] - distance at which preload the object |PARAMETER1= | ||
|p2 = object: [[Object]] - existing object | |p2 = object: [[Object]] - existing object | ||
| [[Boolean]] - [[true]] when preload is finished |= | | [[Boolean]] - [[true]] when preload is finished |RETURNVALUE= | ||
|s2 = distance '''preloadObject''' classname |= | |s2 = distance '''preloadObject''' classname |SYNTAX= | ||
|p21= distance: [[Number]] - distance at which preload the object |= | |p21= distance: [[Number]] - distance at which preload the object |PARAMETER1= | ||
|p22 = classname: [[String]] - classname of the object | |p22 = classname: [[String]] - classname of the object | ||
| r2 = [[Boolean]] - [[true]] when preload is finished|= | | r2 = [[Boolean]] - [[true]] when preload is finished|RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 30: | Line 30: | ||
[[waitUntil]] {10 [[preloadObject]] "SoldierW"}; | [[waitUntil]] {10 [[preloadObject]] "SoldierW"}; | ||
[[hint]] "Preload finished"; | [[hint]] "Preload finished"; | ||
};</code>|= | };</code>|EXAMPLE1= | ||
|x2= <code>[] [[spawn]] | |x2= <code>[] [[spawn]] | ||
{ | { | ||
[[waitUntil]] {10 [[preloadObject]] [[leader]] [[player]]}; | [[waitUntil]] {10 [[preloadObject]] [[leader]] [[player]]}; | ||
[[hint]] "Preload finished"; | [[hint]] "Preload finished"; | ||
};</code>|= | };</code>|EXAMPLE2= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]]|= | | [[preloadCamera]], [[preloadSound]], [[preloadTitleObj]], [[preloadTitleRsc]]|SEEALSO= | ||
}} | }} |
Revision as of 14:44, 7 April 2019
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:
- Uncategorised
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