Wheel
About 445 wordsAbout 1 min
This hologram type is animation, with mode execution set to wheel
Animation Features
This animation operates similarly to the monitor mode under hologram. The animation uses particle effects to generate a circular border with 12 item slots, where the top slot is the prize. The operation mode is like a clockwise clock, with items moving from 12 o'clock to 1 o'clock, from 1 o'clock to 2 o'clock, and so on. After the prize is revealed, players simply right-click on the item in the center of the circle to claim it, otherwise it will be stored in the prize warehouse.
Animation Structure
This animation consists of 3 Particle elements, 12 item slots, 1 template title, and 1 prize claim slot.
Customization Degree
You can modify these:
- Particle type
- Circle size (requires adjusting parameters of other slots)
- Animation execution steps to change prize movement speed
- Item display at the end
- Distance offset between item slots and players or other item slots (can be adjusted based on your text width)
Global Configuration File
This file is located at PixelReward/reward/animation.yml
You can set variable placeholders for the animation to display congratulations at the end
You can refer to hologram.yml
Template File
Note
Custom template files must be stored in the PixelReward/template/ folder
type: animation
mode: wheel
requirement:
req1: has_money;1000
req2: papi_double;%player_level%;>=;10
# Which reward template do you apply
reward: toolreward
actions:
- console_command{command=eco take %player% 1000}
- run_animation{animation=default}
animation:
# Do not change the number
# title
global:
text:
- '<yellow><b> ↑ Wheel ↑</b></yellow>'
- '<shadow:#000000FF><b>%reward_template%</b></shadow>'
- '<rainbow>{b}</rainbow>'
# Clock positions
# You don't necessarily need to follow the clockwise circular arrangement
# You can customize the position of each item slot
'0':
y: -0.5
offset: 0.0
'1':
y: -0.94
offset: 0.82
'2':
y: -2.0
offset: 1.4
'3':
y: -3.0
offset: 1.75
'4':
y: -4.19
offset: 1.4
'5':
y: -5.21
offset: 0.82
'6':
y: -5.78
offset: 0.0
'7':
y: -5.21
offset: 0.82
'8':
y: -4.19
offset: 1.4
'9':
y: -3.0
offset: 1.75
'10':
y: -2.0
offset: 1.4
'11':
y: -0.94
offset: 0.82
title:
y: -3.41
offset: 0.0
reward:
y: -3.79
offset: 0.0
options:
# Only one instance of this template can be run at the same time.
# It is recommended setting it as true when using run_animation{specific location} in actions
one-only: true
# Circle radius
# After adjusting this value, you also need to adjust the offset values above
radius: 3.5
particle-type: END_ROD
# Particle refresh interval in tick(s)
refresh-interval: 40
side-offset: 1.5
forward-offset: 0.0
# Vertical distance offset for the entire hologram group
vertical-offset: 3.61