zscript-doc/api/events/ConsoleEvent.md

37 lines
805 B
Markdown
Raw Normal View History

# ConsoleEvent
The information for a `ConsoleProcess` or `NetworkProcess` event.
```
struct ConsoleEvent
{
readonly int Player;
readonly string Name;
readonly int Args[3];
readonly bool IsManual;
}
```
2019-08-14 03:31:41 -07:00
### `Player`
2019-08-14 03:31:41 -07:00
The player who created this event, or `-1` if there was no activator. This will
always be positive for `NetworkProcess` events and always `-1` for
`ConsoleProcess` events.
2019-08-14 03:31:41 -07:00
### `Name`
2019-08-14 03:31:41 -07:00
The name as provided to `SendNetworkEvent`. Use this to distinguish between
event types. It is favorable to prefix names with the name of your mod or game
so that it will not potentially conflict with other mods.
2019-08-14 03:31:41 -07:00
### `Args`
2019-08-14 03:31:41 -07:00
The arguments as provided to `SendNetworkEvent`.
2019-08-14 03:31:41 -07:00
### `IsManual`
2019-08-14 03:31:41 -07:00
`true` if this event was created manually, for instance through a console
command.
<!-- EOF -->