START | skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF/START> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, otherwise if you use a 'Variable', this variable will be TRUE / FALSE as an integer.
<Value> = The array containing the text you wish to be spoken.
<Var/Number> = The priority you wish to asign to this task.
This command is used to add all the items you want to speak into the array and it will speak them one after the other the same way it works internally in the game engine.
The array must have a specific structure however. This requires the array to first be created and then the required elements added to that array.
Basically the structure need to be 'page id' then 'text id' for what you want spoken.
Eg,
$speak.array = create new array, arguments = page.id, text.id, page.id, text.id, null
A detailed explanation of the required structure can be found here.
Example:
It should be noted that from testing done, particular care should be taken to ensure the 'name array' exsists before trying to use it. Failing to do this has resulted in unexpected script behaviour.
$this.object = get player tracking aim
If = $this.object get object name array
$object.name.array = $this.object get object name array
START = speak array: $object.name.array prio =100
end
The name array will first be retrieved for the player target and if it is a valid name array it will be inserted into the 'speak array' command and spoken by 'Betty'. Using START as the command prefix allows the script to continue on while the text is being spoken.
Command Location:
- »» Audio Commands
- <RetVar/IF/START> speak array: <Value> prio =<Var/Number>