Achievement
- Last UpdatedDec 16, 2023
- 4 minute read
This topic is part of Specialized 2D Nodes.
Achievement node
The Achievement node shows the user a 2D short message with a title, text, and an image.
The message is briefly visible and then performs an animation while appearing and disappearing.

There is usually only one achievement node in a project, because:
-
The message node can be used to display different messages.
-
The Achievement node has a queue. So whenever the script triggers a new message, the message always appears correctly at the right time.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
To display an Achievement message
-
Use the show parameter with a set of three attributes (image, title, and text).
Code example
This is a code example for an achievement message.
<route from="tm_0.t1_state" to="achievement.show" condition="@tm_0.t1_state@==success" value="ach_ok.png|Completed|Task 1"/>
Code example
This is a code example for the Achievement node.
<Achievement name="achievement" size="256 64" sizeIcon="64 64" positionIcon="0 0" positionLine1="100 5" positionLine2="100 35" animationMode="left" imageBackground="ach_background.png"/>
Achievement fields
These are the fields for Achievement node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > Achievement
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
animationMode |
senum |
Optional |
top |
Defines the animation appearing and disappearing mode: top, left, right, or bottom fade. |
|
colorLine1 |
svec3 |
Optional |
1 1 1 |
Text color for title line. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
colorLine2 |
svec3 |
Optional |
1 1 1 |
Text color for text line. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
fontLine1 |
sstring |
Optional |
Arial,Bold,32 |
The font to use for title line. The font name must be a system font. Only Bold and Regular values are accepted. |
|
fontLine2 |
sstring |
Optional |
Arial,Bold,26 |
The font to use for title line. The font name must be a system font. Only Bold and Regular values are accepted. |
|
imageBackground |
sstring |
Optional |
Not set |
Name of the image to use as the background image. If the size differs from the size defined in the Achievement size field, then the image is stretched. |
|
order |
sint |
Optional |
100 |
The node z order defines the display order of different children. The range is 0-255. |
|
position |
svec2 |
Optional |
0 200 |
Position of the achievement in reference to the screen top left corner. This position refers to the achievement at the end of the appearing animation. |
|
positionIcon |
svec2 |
Optional |
14 14 |
Position offset of the achievement icon in reference to the top left corner of the achievement. |
|
positionLine1 |
svec2 |
Optional |
140 30 |
Position offset of the title line in reference to the top left corner of the achievement. |
|
positionLine2 |
svec2 |
Optional |
140 60 |
Position offset of the text line in reference to the top left corner of the achievement. |
|
timeEnter |
sfloat |
Optional |
0.5 |
The appearing animation time in seconds. |
|
timeDisplay |
sfloat |
Optional |
2 |
The achievement display time in seconds. It does not include the animation time. |
|
timeExit |
sfloat |
Optional |
0.5 |
The disappearing animation time, in seconds. |
|
show |
sstack |
Optional |
Not set |
The field used to trigger the display of one or more achievements. The syntax is: "image|title|text,image|title|text..." |
|
size |
svec2 |
Optional |
512 126 |
Size of the achievement. |
|
sizeIcon |
svec2 |
Optional |
512 128 |
Size of the achievement icons. |
|
visible |
sbool |
Read only |
false |
Displays the achievement. |