The Game Maker Editor has a redesigned user interface. Documentation is being updated.
What are Presets?
Use the Presets tool to save the properties you have applied to one or more objects such as position, logic, and more to speed up your build time or spawn customised logic during live gameplay.
Play Mode - Spawn or Replace Assets or Presets
Builder Mode - Place Presets of repeat use objects or groups of objects with specific logic applied and 3D orientation for custom outcomes
Presets can be:
Single Object
Multi Object
Parent and Child Objects
Presets may be nested to include other Presets as part of their setup.
Examples:
Enemy camp setups for repeated use in your Experience
Nested presets with item drops when parent objects are destroyed
Manage Presets
Open the Library (Press the L key). Click Presets in the Elements filter on the left side. If the Preset includes multiple objects without a Parent, it will have a white icon.
Presets can be added to the Toolbar or placed in an Experience like any Object, but will keep the settings you saved.
It is a known issue that Presets may not preserve Parent/Child relationships in Game Maker 0.8 during gameplay. Test thoroughly.
Place an Object and open the Properties Panel.
Apply Behaviors and Components, customising the Object's parameters as you like.
Save the Preset using the Presets button or the ≡ menu in the Hierarchy.
A pop-up window will display existing Presets you have made and the option to create a new Preset. Click Create New and give the Preset a name, then click Done.
To save a Preset from multiple Objects, select all of them and proceed to step 3 to save as a single Preset.
To save a Preset from a Parent Object and preserve its relationship with its Child Objects, select the parent Object in the Hierarchy or using the Presets button and save it as a single Preset.
Note: With Game Maker 0.8 it is a known issue that Parent/Child relationships may not be preserved when spawned during live gameplay (for example, when picking up the Parent, the Child Object(s) may not follow. Test thoroughly to ensure you've achieved the desired functionality.
Example:
This Preset is an enemy that drops a coin when defeated.
Place Object.
Apply Melee Enemy Behaviour and customise parameters.
Melee Enemy Behaviour also adds a Health Component to the Object so it can be defeated.
Open the Library, find the desired Preset, right-click on it and choose Delete.
Any Objects in your Experience that were set to spawn a Preset you have deleted will not spawn anything.
Use this workflow to:
Modify settings on Objects included in your Preset
Substitute an Object in your Preset with a new one
This method overwrites the previous version of your Preset. If you think you will need it again, make a duplicate before updating.
Place the desired Preset in the Experience.
Make the desired changes to an Object's Properties or substitute with a different Object.
Select the Object(s) to include in the new version of the Preset. Press the Presets button or the ≡ menu in the Hierarchy (like saving a Preset) and choose Replace Preset.
Select the Preset you want to replace, type a new name, and press Done.
The Preset's new name, new Object(s), and Properties, will be reflected in the Library and locations the previous Preset had been set to be spawned.
All changes, including the name of the Preset, will be updated in the Library and anywhere a Preset has been used (Asset Spawner Behaviour, Replace Asset Behaviour, Drop Component, etc).
Updating a Preset will NOT update every instance where it was placed in your Experience. To do that, use the Hierarchy's ≡ menu and select Replace with Preset.
Updating a Preset does NOT change instances where you have placed it in the Experience, only how it will be spawned from other Objects.
You can use this process to replace a placeholder Object while you create custom art for your Experience. Placeholders are great for testing logic while final art is being made.
Open the Hierarchy and select the Object you want to replace.
Open the ≡ menu for the Object and choose Replace with Preset.
Select the Preset you want to use from the popup window and click Done.
The original Object will be replaced by the chosen Preset.
Spawn Presets During Gameplay
During live gameplay, some logic allows you to spawn Objects with limited default settings or spawn Presets with customised settings.
Select an Asset that will spawn a Preset.
Apply a Behaviour or Component that will use a Preset during play mode and click on the appropriate parameter to open the Presets popup window:
Asset Spawner Behaviour - Asset to Spawn
Replace Asset Behaviour - Replace By
Drop Component -Preset
Select the Preset you want to use and click Done.
Example:
This logic setup spawns a Preset Skeleton Warrior when a crate Object has been destroyed.
Below, a Health Component has been added to the crate so it can be destroyed and a Drop Component has been added with a Skeleton Warrior Preset applied in the Preset parameter.
The Skeleton Warrior Preset used includes dropping a collectable coin when it is defeated.
Nest Presets for Multiple Layers of Spawning
Use the same Behaviors and Components to replace Objects with Presets, Spawn Presets, and Drop Presets. Save these in a new Preset and you have nesting Presets that will be spawned during the game.
Example:
The logic setup below spawns a Preset Skeleton Warrior when a crate Object has been destroyed, and when the Skeleton Warrior is defeated, a rotating Magic Coin Preset is dropped.
Create a new Preset called Magic Coin with Bird Behaviour. This adds a slight rotation to the coin.
Update the Skeleton Warrior Preset's Drop Component and select the Preset to spawn as Magic Coin. This spawns the Magic Coin Preset when the defeat condition is met in the Skeleton Warrior Preset.
Another layer is added when a crate Preset uses the Drop Component and the Skeleton Warrior is selected as the Preset to drop.
Use the Crate Preset as many times as you like in Builder Mode or set it as an item to spawn in your object logic.