Guide:Randomization

From Project Arrhythmia Wiki
Jump to navigation Jump to search

Randomization is a feature which allows keyframes in objects to be set to a random position. Randomization only affects position, scale, and rotation keyframes. Color and event keyframes cannot be randomized.

Types of Randomization

  • None: The keyframe is not randomized. It will appear in the same place every time.
  • Linear: The keyframe will appear at a random point between two values. X and Y values are randomized independently.
  • Toggle: The keyframe will be at one of two values. For position and scale, X and Y are randomized independently, so the object will be at one of 4 values.
  1. Xmin,Ymin
  2. Xmin,Ymax
  3. Xmax,Ymin
  4. Xmax,Ymax
  • Relative: The keyframe is set to some initial value, and then multiplied by a multiplier, which is randomized between Multiplier Min and Multiplier Max.

Randomize Interval

Randomize Interval is an option on the Linear and Relative randomizations. If it is set to a value other than 0, the keyframe will only randomize to values that are a multiple of the interval. For example, given a keyframe randomized between 0 and 10:

  • 0 Interval: All numbers between 0 and 10
  • 1 interval: [0,1,2,3,4,5,6,7,8,9,10]
  • 5 interval: [0,5,10]
  • 10 interval: [0,10]

Uses of Randomization

  • Randomized attack position (linear): The most common use of randomization, causing bullets, beams, or other simple attacks to appear anywhere on the screen.
  • Bullets appearing on either side of the screen (toggle): If a bullet is scale parented to an object at the center of the screen, and the parent's x scale is toggle randomized between 1 and -1, the bullet will appear on either side of the screen randomly.
  • Random size while preserving shape (Relative): Using relative parenting on scale keyframes can randomize the size of an object, while keeping it's shape the same.

Rotation Randomization

Because rotation is relative instead of absolute like other keyframes, it's impossible to rotate an object to a specific value after a random rotation keyframe is used. So, you shouldn't use this on objects that you want to be in a specific direction after rotation, like a boss that rotates and then becomes upright again.

Guides
Editor Basics First steps • Song VerificationCreating an objectKeyframingParentingRandomization • Prefabs • Uploading a level • Creating a collection
Editor Skills Creating characters • Animation techniques • Creating gameplay • Brainstorming ideas • Choosing a song • Telling a story
Technical Text formatting • Sharing level assets • Changing level audio