ScratchIt
🇨🇳 简体中文
🇨🇳 简体中文
  • 👋🏻欢迎使用
  • ⚙️首次安装
  • 📄在线编辑器
  • 📖配置文件
    • 权限
    • 卡片
      • 如何创建一个新卡片
      • 图标位置
      • 动作
      • 冷却
      • 取消使用
    • 战利品
    • 卡片示例图片
  • 兼容的插件
    • WorldGuard
  • 兼容的Minecraft版本
  • 📒获得支持
    • 🐞反馈Bug
    • 📕获取帮助
  • 开发者
    • ☕️Java API
      • Basic API
      • 自定义卡片渲染器
Powered by GitBook
On this page
  • Introduction
  • Special notes
  • Repeating the same frame multiple times
  • Adjusting the animation position
  • Specify win/lose background duration
  • Automatically create list of frames in the .yml config

Was this helpful?

  1. 📖配置文件
  2. 卡片

动作

Introduction

You can create win/lose animations for your cards as you can see in my example cards.

The good thing is that you don't have to draw the background on each frame of the animation but you can separate animation from the background, as you can see in my examples.

Special notes

Repeating the same frame multiple times

If you want to repeat the same frame you can avoid copying and pasting the same .png file, instead you can do that:

  win_anim:
    frames:
    - 0|x10
    - 1
    - 2
    - 3
    - 4
    - 5

As you can see I used this special name |x10, this means that the frame named 0.png will be executed 10 times.

Adjusting the animation position

This plugin will center the animation automatically, but if you want to move it you can set this special attribute (shift):

  win_anim:
    shift:
      x: 0
      y: 15
    frames:
      - anim_4|x6
      - anim_5|x2
      - anim_6|x2
      - anim_7|x2
      - anim_8|x2
      - anim_9|x2

Specify win/lose background duration

If your card doesn't have any animation and you want to show the win/lose background for some seconds you can do that:

  win_anim:
    static_background_duration: 30
  lose_anim:
    static_background_duration: 30

Automatically create list of frames in the .yml config

You don't need to manually input all the file names, you can use this command to make the plugin write the files list for you: /scratchit config AutoListAnimationFiles <card_name> <animation_type>

For example:

Previous图标位置Next冷却

Last updated 4 years ago

Was this helpful?