-
Notifications
You must be signed in to change notification settings - Fork 2
Interactive Objects
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.
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.
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.