Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Creating Obstacles

knot126 edited this page Oct 2, 2023 · 11 revisions

Obstacles are not just things that block the player or things that break; they are also used to create crystals and even for making moving, solid boxes. Smash Hit doesn't know how a pyramidal crystal is different from a glass bar, other than that one gives balls upon being broken.

Creating obstacles

You can add an obstacle by going to the 3D viewport's menu → ShatterCreate obstacle. You can also use the keyboard shortcut Shift + Alt + F.

Obstacle Properties

Template

See also: Templates

Sets the template that the obstacle will use.

Type

You have the option to use a dropdown to select which obstacle you want this to be or to continue typing the file name manually.

Manual

The name of the obstacle that should be loaded. Examples: scoretop (crystal), bar (glass bar), framedwindow (glass in Granny Smith moregames) and beatmill (mill that moves to a beat, unused normally).

Using the obstacle picker

Click Use obstacle chooser to replace the text box with a dropdown menu.

Now, click the drop down that says "Obstacle" (it should be "Crystal: Pyramidal" by default). Using this menu, you can change which obstacle that you want this to be.

Visibility

  • Modes: Allows choosing the game modes that this obstacle will appear in.
  • Difficulty: Allow setting the difficulty range that this obstacle will appear under.

Parameters

The parameters control what options are passed to the obstacle. Parameters can be used to customise how the obstacle looks or function, such as controlling the speed of a glass fan or the number of rays in a laser. They take the form key=value and there can be up to twelve.

It is usually best to start using the parameters after the second one since the zeroth and sometimes first are used to pass in template options and would be overridden.

Note

The first parameter (param0) will be disabled if a template is set.

Adding custom obstacles to the chooser

Go to your Blender Tools folder (C:/Users/%USERNAME%/Shatter on Windows or ~/Shatter on Linux and macOS) and create a text file called obstacles.txt.

Hint: On Windows, it's just obstacles if you don't have viewing file extensions enabled.

Now, edit the new file. To add an obstacle, create a line with obstacleFileName=Obstacle display name where there are no spaces between the = on either side. To add more obstacles, just create new lines in the same format.

For example, if I had box, scorebig and foxtoy as obstacles, I might make the file:

box=Box
scorebig=Score Big
foxtoy=Fox toy

Invalid lines (those without an =) and lines that start with # will be treated as comments.

Design Tips

  • When an obstacle has an obvious bottom, its location should be flush with the surface which it is sitting on.
Clone this wiki locally