Essentials Series/Simple Objects

This page is part of the Essential Series modding tutorials. A Simple Object (SIMP) is an entity asset that creates a model in the world. The model can be in any position, rotation or scale, can be visible or invisible, solid or unsolid, and can have animations. They can move through links to ../Platforms/ and their behavior changed mid-game through events. SIMPs are usuallt found in the Default layer of the level's HIP.

Using SIMPs
Industrial Park has a Generic SIMP template. After placing the template, you must assign it a model yourself, otherwise the game will crash. Many other templates also place SIMPs.

You can check Entity Assets and Gizmos for general information about placement of Entity assets. Note that SIMPs use the CollType field under Simple Object in the Asset Data Editor, not the same SolidityFlag of other Entity assets.

SIMPs as Level Models
This is explained in the ../Custom Models/ tutorial. When importing a custom level, Industrial Park will automatically generate SIMPs for all your models. These SIMPs are solid and visible by default.

Events
Those events work the same way on any Entity Asset.
 * Visible: send this to an invisible entity to make it visible. This does not change the state of collision.
 * Invsible: send this to a visible entity to make it invisible. This does not change the state of collision.
 * CollisionOn: send this to an unsolid entity to make it solid. This does not change the state of visibility.
 * CollisionOff: send this to a solid entity to make it unsolid. This does not change the state of visibility.
 * CollisionVisibleOn: essentially combines Visible and CollisionOn.
 * CollisionVisibleOff: essentially combines Invisible and CollisionOff.
 * Hit: a SIMP receives this event when the player hits it with an attack. This is used by the fountain in the second area of the hub to make the sock visible, for example. You can also detect specific attacks with HitMelee, HitBubbleBounce, HitBubbleBash, HitBubbleBowl, HitPatrickSlam, HitByThrowable and HitCruiseBubble.
 * AnimPlay/AnimPlayLoop: check Animations.

Note: the Visible, Invisible, CollisionVisibleOn and CollisionVisibleOff events can have a pop-in/pop-out effect with bubbles if you set the first argument of the link to 77.

Animations
SIMPs with rigged models can play animations. You can check ../Custom Models/ and ../Custom Animations/ for information on making custom models with animations. Assuming you already have the model and animation in your HOP file, these are the steps to enable your SIMP to play animations:
 * 1) Create an Animation List asset (you can place a template).
 * 2) Add your animation(s) to the ALST.
 * 3) Create a SIMP if you haven't already, and set the Model_AssetID of the SIMP to the MODL you want it to use. Set the Animation_AssetID of the SIMP to the ALST's.
 * 4) When you want the animation to play, send the AnimPlay event to the SIMP for it to play once or AnimPlayLoop for it to continue playing. The first argument of the link should be the index of the animation in the ALST. This index is 1-based, meaning 1 is the first animation in the ALST (animation 0), 2 is the second (animation 1), etc.

This information also applies to other Entity assets, such as ../Platforms/, which can also play animations. Note that the asset's collision will not move along with the animation. This is meant to be used only on unsolid SIMPs.

Drivenby
Drivenby is an event that connects a SIMP to another moving object, usually a platform. This is done by adding the link ScenePrepare => Drivenby to the SIMP's links, with the platform as the target asset. The SIMP will follow any movement done by the platform, not mattering how physically far the two objects are. This is sometimes done with a platform that is invisible and unsolid, meaning its only purpose is to drive other assets. A SIMP can "be drivenby" a PLAT or even another SIMP that is also drivenby something else, creating a hierarchy of movement.

Normally, only translation will be followed (up, down, left, right, forward, backwards). To enable rotation movements as well, set the first argument of the link to 1.

A drivenby loop (an asset drivenby itself, even indirectly) will crash the game instantly.