wiki
Storyboard/Scripting/Objects查看官网原文 ↗
这篇还没汉化,先拿英文原文顶着。(有想看的页面?催更就完事了。)

Storyboard objects

SB object/sprite call

Note: For objects in osu! and Beatmapping, see Hit Objects

In Storyboarding, Objects are sprites or animations that appear on the screen and make up the storyboard. Instances of SB-specific audio can also be considered to be objects; however, for clarity, they have their own section of this guide.

Object Definition

To call an instance of a sprite (a still image) or an animation, use a single line in the [Events] section of an .osb or .osu file.

Basic image Moving image
Sprite,(layer),(origin),"(filepath)",(x),(y) Animation,(layer),(origin),"(filepath)",(x),(y),(frameCount),(frameDelay),(looptype)

Where:

Layers have these values:

Value Layer
0 Background
1 Fail
2 Pass
3 Foreground

Origins have these values:

Value Origin
0 TopLeft
1 Centre
2 CentreLeft
3 TopRight
4 BottomCentre
5 TopCentre
6 Custom (same effect as TopLeft, but should not be used)
7 CentreRight
8 BottomLeft
9 BottomRight

For animation only

Take note that there is no indication of when the object should appear. That is entirely up to the commands themselves. The order of the object declarations in the .osu or .osb file only affects what overlaps what; it has no bearing on when the object appears (although it's conventional to keep the declarations ordered based on when they appear anyway).

Examples

Basic image Moving image
Sprite,(layer),(origin),"(filepath)",(x),(y) Animation,(layer),(origin),"(filepath)",(x),(y),(frameCount),(frameDelay),(looptype)

Some examples of object declarations:

Sprite,Pass,Centre,"Text\Play2-HaveFunH.png",320,240

This declares a still image (sprite) based on the "Play2-HaveFunH.png" file located in the "Text" folder. The image appears on the Pass layer, and the centre (centre) of the image will be located at (320,240) on the game screen (the exact centre of the screen).

Animation,Fail,BottomCentre,"Other\Play3\explosion.png",418,108,12,31,LoopForever

This declares an animation, whose frames can be found as "explosion0.png", "explosion1.png", ..., "explosion11.png" in the "Play3" folder of the "Other" folder. The image appears on the Fail layer, and the bottom centre of the image will be located at (418,108) on the game screen. There are 12 frames in the animation (hence why the last frame is named "explosion11.png"), and there is a 31 millisecond delay between each frame (thus the animation takes 31 * 12 = 372 milliseconds to loop once). After the game has displayed the last frame for 31 milliseconds, it moves back to the first frame, continuing until the object is no longer appearing on the screen.