Essentials Series/Links

From Heavy Iron Modding
Essentials Series
  1. Introduction
  2. Industrial Park basics
  3. Editing Assets
  4. Templates
  5. Links
  6. Dispatchers
  7. Tikis and Enemies

This page is part of the Essential Series modding tutorials. It will cover how to use Industrial Park to create links between assets. For a more technical explanation of links, see Events.

Base and Entity Assets

Please take a look at the Classes of Assets page. We're concerned about two basic groups of assets, namely Base (which we sometimes call Object assets) and Entity (which we sometimes call Placeable assets). The Asset Data Editor for Base assets has all the properties detailed for Base assets in that page, same for the Entity assets. All Entity assets are also Base assets (so they have everything Base has), and all of these assets can create Links to each other. Industrial Park automatically sets the AssetID and AssetType fields for base assets, so you don't have to worry about them. Common base assets are Counters, Timers, Dispatchers and Conditionals, and common entity assets are Simple Objects, Platforms, Buttons, Boulders and User Interfaces. Note that having a 3D position in the world does not automatically mean the asset is an entity; Sound Effects and Cameras have positions but are only Base, and Markers have positions but are not even Base!

Events

An event is a signal, message, or instruction that can be sent to any Base asset. Events are usually used to notify an object of something happening between that object and another object. For example, when the player walks inside a trigger, the EnterPlayer event is automatically sent to the trigger. Events are also used to notify objects of something important happening in the scene. For example, all Base assets receive the Scene Prepare event during xSceneInit(), which some entities use internally to know when to set themselves up. Events can also be sent directly from one object to another.

List of Events

We do not have a list for Scooby-Doo: Night of 100 Frights, so we use the Battle For Bikini Bottom one instead, which has leftover events from Scooby.

Links

A link is an extra bit of metadata that can be added to any Base asset. They are mainly used to connect the functionality of one object in a scene to another. A link acts as a "receiver" for a specific type of event that can be sent to the object, and in response to receiving the event, it "sends" a new event to another object in the scene or the object that it belongs to, along with a few parameters. For example, you can define a link on a trigger object that receives the EnterPlayer event, and sends the GiveShinyObjects event to the player object in response, with the 1st parameter set to 100 (the amount of shiny objects). That object will also activate any links that receive the event you sent, so to continue the example, if you want to you can also define a link on the Player which receives GiveShinyObjects and sends Increment to a Counter. When you play the scene, every time you walk into the Trigger, EnterPlayer will be sent to it, which causes GiveShinyObjects to be sent to the Player, which causes Increment to be sent to the Counter.

Links can also send events to the same object it belongs to, so you can, for example, define a link on a Trigger that sends Disable to itself when it receives ExitPlayer. Some types of objects do this automatically, such as Counters. When a Counter receives Increment or Decrement and its new value is 0, it automatically sends Expired to itself.

Link List Editor

Link List Editor in a BUTN asset

The Link List Editor shows up when you click on the [...] box next to the Links field in the Asset Data Editor for Base assets. It allows you to add, remove, copy, paste, reorder and edit links.

  • Source Event: the event which triggers this link when sent to this asset.
  • Target Event: the event sent by this link upon being triggered.
  • Target Asset: the object asset to which the event is sent.
  • Argument Asset: the asset ID which is sent as a parameter. The use of this varies depending on the events and assets using it.
  • Source Check: the link will only be triggered if the asset which sent the source event matches this one. If null (most cases), any asset which sends the source event will trigger this link.
  • Arguments: the 4 float parameters of the event. Some events read this as asset IDs so the hex checkbox allows that.

Target Asset shortcuts: Self (inserts sender asset as target asset) and +1 (increments number at the end of asset name by 1).