| No edit summary Tag: 2017 source edit | No edit summary Tag: 2017 source edit | ||
| (22 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| = | <div style="font-size: 3rem;">[https://wiki.figuramc.org/index.php/User:PenguinEncounter/sandbox?action=purge purge it]</div> | ||
| [[Media:FunctionProtocol.svg]] | |||
| [[File:FunctionProtocol.svg]] | |||
| {{User:PenguinEncounter/newtype|function|Vector2|#TickEventCallback}} | |||
| For example, to get the cube {{Emoji|BBCube.png}} RightArm: | |||
| This is what is in your project: | |||
| {{#invoke:MatrixFields|run|size=4}} | |||
| {{tree|icon=FSFolderOpen.png|content=<code>my_avatar</code>|inner= | |||
| {{tree|icon=FiguraJSON.png|content=<code>avatar.json</code>}} | |||
| {{tree|icon=BBModel.png|content=<code>model.bbmodel</code>}} | |||
| }} | |||
| {{tree|icon=BBModel.png|content=<code>model.bbmodel</code>|inner= | |||
| {{tree|icon=BBGroup.png|content=Head|inner= | |||
| {{tree|icon=BBCube.png|content=Head}} | |||
| {{tree|icon=BBCube.png|content=HeadLayer}} | |||
| }} | |||
| {{tree|icon=BBGroup.png|content=RightArm<br>oops|inner= | |||
| {{tree|icon=BBCube.png|content=RightArm}} | |||
| {{tree|icon=BBCube.png|content=RightArmLayer}} | |||
| }} | |||
| }} | |||
| == conspicuous example code == | |||
| {{#tag:syntaxhighlight| | |||
| function events.tick() | |||
|     <nowiki>--[[wiki.figuramc.org, </nowiki>{{FULLPAGENAME}} rev. {{REVISIONID}}<nowiki>]]</nowiki> | |||
|     models.model.Head:setVisible(false) | |||
| end | |||
| |lang=lua}} | |||
| = <code>HostAPI:setTitleTimes</code> = | |||
| {{Host only|kind=method}} | |||
| Configures the hold, fade-in, and fade-out durations of titles displayed on the screen. | |||
| == Usage == | |||
| {| class="wikitable" | |||
| ! Arguments !! Return Type | |||
| |- | |||
| | <code>setTitleTimes(timesData {{type|Vector3}})</code> | |||
| | self {{type|HostAPI}} | |||
| |- | |||
| | <code>setTitleTimes(fadeInTime {{type|integer}}, stayTime {{type|integer}}, fadeOutTime {{type|integer}})</code> | |||
| | self {{type|HostAPI}} | |||
| |} | |||
| == Examples == | |||
| <syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
| host:setTitleTimes(1, 1, 1) | |||
| </syntaxhighlight> | </syntaxhighlight> | ||
| == See Also == | |||
| <!-- idk --> | |||
Latest revision as of 03:42, 31 March 2025
functionVector2TickEventCallback
For example, to get the cube  RightArm:
 RightArm:
This is what is in your project:
Column fields
Column fields in the form cN (c1, c2, c3, c4) read the values in the specified column as a Vector4.
The field produces the same result as an equivalent call to getColumn(n).
Column fields are also available by indexing by the column number alone (i.e. mat[1].)
Row fields
Row fields in the form rN (r1, r2, r3, r4) read the values in the specified row as a Vector4.
The field produces the same result as an equivalent call to getRow(n).
Value fields
Value fields in the form vRC (v11, v21, v31, v41, v12, v22, v32, v42, v13, v23, v33, v43, v14, v24, v34, v44) read the value (a number) at the specified row and column.
The row number comes first, then the column number.

my_avatar
avatar.json
model.bbmodel

model.bbmodel Head
Head Head
Head HeadLayer
HeadLayer RightArm
RightArmoops
 RightArm
RightArm RightArmLayer
RightArmLayerconspicuous example code
function events.tick()
    --[[wiki.figuramc.org, User:PenguinEncounter/sandbox rev. 889]]
    models.model.Head:setVisible(false)
end
HostAPI:setTitleTimes
For more information, see Pings.
Configures the hold, fade-in, and fade-out durations of titles displayed on the screen.
Usage
| Arguments | Return Type | 
|---|---|
| setTitleTimes(timesData Vector3) | self HostAPI | 
| setTitleTimes(fadeInTime integer, stayTime integer, fadeOutTime integer) | self HostAPI | 
Examples
host:setTitleTimes(1, 1, 1)
 
			
		