AstrumClient (Actor Component)
AstrumClient
Parent - Actor Component
Connect (method)
Connect to an Astrum Server instance using the
Server Address and Portstring variable.
Inputs
No inputs.
Outputs
No outputs.
Note: When connecting, Astrum UE4 client will fetch players that are already on the Astrum endpoint (ip address, unless forwarded). To reinitiate the mobile clients, clients are forced to refresh. This process will take a few seconds.
Disconnect (method)
Disconnect to any Astrum Server the client is connected to.
Inputs
No inputs.
Outputs
No outputs.
Add Custom Astrum Event (method)
You may only register and use custom Astrum events if you have access to the AstrumServer/AstrumClient source code and can edit it.
Inputs
| Name | Type | Description |
|---|---|---|
| Custom Event | String | The name of the custom event you want to register/bind an event to (case sensitive - unique). |
Outputs
| Name | Type | Description |
|---|---|---|
| Succeeded | Boolean | If the method call succeeded in registering the custom Astrum event (if failed, couuld be duplicate event name). |
Emit Custom Event to Client Id (method)
Emit a custom event to a set of specific client ID's (or one).
Inputs
| Name | Type | Description |
|---|---|---|
| Recipient Players | String (array) | An array of Client Ids that will recive the event. |
| Event Name | String | The name of the custom event you want to emit. |
| Data | JSON Object | Any data to be sent with the emitted event. |
Outputs
No outputs.
Emit To All Clients (method)
A simple wrapper for SocketIO emit event.
Inputs
| Name | Type | Description |
|---|---|---|
| Event Name | String | The name of the custom event you want to emit. |
| Data | JSON Object | Any data to be sent with the emitted event. |
Outputs
No outputs.
Vibrate Controller (method)
Vibrate the controller of either a: player, group, or all clients connected.
Inputs
| Name | Type | Description |
|---|---|---|
| Vibration Times | Float (array) | Each float representing the milliseconds of either the vibration or wait period (starting with the first vibration). |
| Recipients | enumEventRecipient | The subject of the emitted event. |
| Player | Astrum Player Controller | The player who will recive the emitted event. |
| Group | Astrum Player Group | The group of players who will recive the emitted event. |
Outputs
No outputs.
Example
Example of Vibration Times - [200.0, 100.0, 200.0, 100.0] would vibrate the controller for 200ms, pause for 100ms, vibrate for 200ms and finally pause for 100ms.
Speak (method)
Have the mobile controller speak using the SpeechSynthesis Web API on either a: player, group, or all clients connected.
Inputs
| Name | Type | Description |
|---|---|---|
| Text | String | The text that will be said by the controllers receiving the event. |
| Recipients | enumEventRecipient | The subject of the emitted event. |
| Player | Astrum Player Controller | The player who will recive the emitted event. |
| Group | Astrum Player Group | The group of players who will recive the emitted event. |
Outputs
No outputs.
New HUD Layout (method)
Update the set of HUD elements on either a: player, group, or all clients connected.
Inputs
| Name | Type | Description |
|---|---|---|
| HUD Layout | Astrum HUD Virtual Element (array) | The text that will be said by the controllers receiving the event. |
| Recipients | enumEventRecipient | The subject of the emitted event. |
| Player | Astrum Player Controller | The player who will recive the emitted event. |
| Group | Astrum Player Group | The group of players who will recive the emitted event. |
Outputs
No outputs.
HUD Element to JSON (method)
Convert Astrum HUD Element into JSON elements readable by Astrum Client and Astrum Server (ready to send).
Inputs
| Name | Type | Description |
|---|---|---|
| HUD Layout | Astrum HUD Virtual Element (array) | The text that will be said by the controllers receiving the event. |
Outputs
| Name | Type | Description |
|---|---|---|
| JSON | JSON Object | The JSON object containing the HUD elements (ready to be sent). |
Test Connection (method)
Check if the client is connected to an instance of Astrum Server.
Inputs
No inputs.
Outputs
| Name | Type | Description |
|---|---|---|
| Connected | Boolean | Result of the test. |