SetObjectAnimatedTexture: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Sets a flipbook texture on an object.}}


{{FuncSyntax|SetObjectAnimatedTexture(object, TextureFile, Rows, Columns [, MaterialSlot])}}
{{FuncSyntax|SetObjectAnimatedTexture(object, TextureFile, Rows, Columns [, MaterialSlot])}}
Line 12: Line 12:
{{FuncParamOptional|MaterialSlot|The objects model material slot.}}
{{FuncParamOptional|MaterialSlot|The objects model material slot.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
Line 25: Line 25:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
[[SetObjectTexture]]
[[SetObjectColor]]
[[SetObjectEmissiveColor]]

Revision as of 11:55, 5 November 2019

SetObjectAnimatedTexture

Type: Function
Context: Client
Introduced: v1.0

Description

Sets a flipbook texture on an object.

Syntax

SetObjectAnimatedTexture(object, TextureFile, Rows, Columns [, MaterialSlot])

Parameters

  • object
    The object identifier.
  • TextureFile
    The files in your package directory.
  • Rows
    Number of rows of your flipbook texture.
  • Columns
    Number of columns of your flipbook texture.
  • MaterialSlot (optional)
    The objects model material slot.

Return Value

  • Returns true on success.

Example

local function OnPackageStart()
	local TextureObject = CreateObject(1, 128651.5234375, 79332.890625, 1579.2681884766)
	SetObjectAnimatedTexture(TextureObject, GetPackageName().."/client/files/AnimatedBanana.PNG", 2, 4)
end
AddEvent("OnPackageStart", OnPackageStart)

See also

SetObjectTexture SetObjectColor SetObjectEmissiveColor