Skip to content

Interactive Objects

Ryan Gee edited this page Dec 30, 2015 · 2 revisions

What they are

Interactive Objects are things in the combat grid, or simply grid squares themselves that can be interacted with on a unit's turn. For example, it may be a door the player can open, or a trebuchet they can trigger. Technically they are a binding between a block of asynchronous code and a square on the map. When a unit uses the interactive object, the code is executed immediately.

Creating them

To create an Interactive Object add an object in the editor with the InteractiveTile script attached. You will only be able to position it on the grid. An implementation of IScriptdEvent is a required component.

Interactivity rules

To restrict whether or not the object is available for interaction during combat, attach an implementation of ITileInteractivityRule to the game object. This is evaluated whenever a unit is selected, and their action menu is computed.

Clone this wiki locally