zscript-doc/api/events/ReplaceEvent.md

31 lines
747 B
Markdown
Raw Permalink Normal View History

# ReplaceEvent
The information for a `CheckReplacement` event. You can mutate the variables in
this event to change the result of replacement checking.
```
struct ReplaceEvent
{
2019-08-14 03:32:51 -07:00
readonly class<Actor> Replacee;
class<Actor> Replacement;
bool IsFinal;
}
```
2019-08-14 03:31:41 -07:00
### `Replacee`
2019-08-14 03:31:41 -07:00
The actor class which is being replaced.
2019-08-14 03:31:41 -07:00
### `Replacement`
2019-08-14 03:31:41 -07:00
What to replace it with. This class type is already effected by skill and actor
definition replacements, so it may be useful to read it. Modify this to change
what the resulting replacement class ends up being.
2019-08-14 03:31:41 -07:00
### `IsFinal`
2019-08-14 03:31:41 -07:00
If `true`, the engine will not attempt to continue going down the replacement
chain, and will directly replace the actor with `Replacement`.
<!-- EOF -->