GetLowLODElement: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix oop)
m (fix typo)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Needs_Example}}
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
Line 17: Line 16:


==Example==
==Example==
<section name="Serverside example" class="server" show="true">
<section name="Clientside example" class="client" show="true">
This example is not done yet:
This example is not done yet:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local obj = createObject(1488,0,0,3,0,0,90) -- Create object
local lod_obj = createObject(1337,0,0,3,0,0,90,true) -- Create LOD object
setLowLODElement(obj,lod_obj) -- Setting LOD, 'attach' to obj
local lod_get = getLowLODElement(obj) -- Get LOD from obj
--lod_get = lod_obj


</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
==Requirements==
==Requirements==
{{Requirements|1.2|1.2}}
{{Requirements|1.2|1.2}}
==See Also==
==See Also==
{{Element_functions}}
{{Element_functions}}

Latest revision as of 19:41, 17 April 2024

This function return the low LOD element that an element is associated with.

Syntax

element getLowLODElement ( element theElement )

OOP Syntax Help! I don't understand this!

Method: element:getLowLOD(...)
Variable: .lowLOD
Counterpart: setLowLODElement


Required Arguments

  • theElement: The element whose low LOD version we want to get.

Returns

Returns a low LOD element if successful, false otherwise.

Example

Click to collapse [-]
Clientside example

This example is not done yet:

local obj = createObject(1488,0,0,3,0,0,90) -- Create object
local lod_obj = createObject(1337,0,0,3,0,0,90,true) -- Create LOD object

setLowLODElement(obj,lod_obj) -- Setting LOD, 'attach' to obj

local lod_get = getLowLODElement(obj) -- Get LOD from obj

--lod_get = lod_obj 

Requirements

Minimum server version 1.2
Minimum client version 1.2

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.2" client="1.2" />

See Also

Shared