GamesScriptIntent games.script-intent@1
Generated at from
openvibe-contracts v0.143.0 and
openvibe-sdk v0.44.0.
- Version
- 1.0.0
- Owner
- games
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/games/script-intent.v1.json
games.script-intent@1: game.emit(intent), a world intent a script queues (games.world.emit). The server validates it like any player's intent before applying it; an invalid one throws inside the script.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
kind | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: spawn
{
"kind": "spawnItem",
"item": "scrap",
"at": {
"x": 0,
"y": 0,
"z": 0
}
}Rejected: no-kind
{
"item": "scrap"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('games.script-intent@1', value); // { valid, errors: [{ path, message }] }