The State Machine has two methods of being used. Event based and Always Running. The Always Running state machine is set up to be running at all times during your simulation. The event based one moves forward along the graph based on the actions taken by the user. Triggers are made available in the event based State Machine as the next transition states need them to be activated.
Actions
Actions are what happens when a state is reached or achieved in the State Machine system. There are a variety of types of actions as listed below that are able to affect your simulation and End User Experience.
How to Author the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Launch “HyperSkill-Desktop.exe”
Log in to your account and select “Simulations” from the home screen
Select a simulation from the list and click on the pencil icon to open it in edit mode.
Click on the State Machine tab to open the State Machine creation UI.
Layout your state changes as desired utilizing the functions outlined in the State Machine Builder User Interface.
When in experience mode the state machine will start from the entry node which is determined by the Entry Node Dropdown. Anything in the Always Running State is being checked at all transitions.
State machine nodes can affect any attribute, but can only have one trigger to act as a transition. There is no limit to the conditions. States execute along the path of the transitions.
How to Author a Translate Behavior in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Translate.
Press the + button to add the state to the action list.
Select the entity of the object you wish to translate in space with the Select Entity dropdown.
Select the x,y,z coordinates of where you would like the object to be translated to. This is translated in Global space.
Set the amount of time you want the object to take from its current location to the end destination with the Speed field. This value must be greater than or equal to 0. Please be aware that if the object is not Kinematic that it will likely behave erratically as other forces, such as gravity or collisions, attempt to act on the object in question
How to Author a Rotate Behavior in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Rotate.
Press the + button to add the state to the action list.
Select the entity of the object you wish to translate in space with the Select Entity dropdown.
Select the x,y,z coordinates of where you would like the object to be rotated to. This rotation is done globally.
Set the amount of time you want the object to take from its current rotation to the end rotation with the Speed field. This value must be greater than or equal to 0. Please be aware that if the object is not Kinematic that it will likely behave erratically as other forces, such as gravity or collisions, attempt to act on the object in question
How to Author a Delay in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Wait.
Press the + button to add the state to the action list.
The duration functions as a delay before any actions after it in the state machine will take place. This is particularly useful if you start an animation in a previous state and want to delay feedback until the completion of the animation.
How to Author a Set Attribute Behavior in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Set Attribute.
Press the + button to add the state to the action list
Select an entity with the dropdown. This will be populated with every VO and VP in your space.
From your selected entity, select the Attribute from the dropdown. This will become selectable after you have selected an entity. The list will populate with every Attribute that currently exists on the selected Entity.
With an attribute selected, the Value field will be able to be entered. This Value will try to automatically fill itself out with a suitable attribute based on the attribute type. For example, types of Boolean will fill in True. This Value is entered as a string regardless of type.
Specifically, for the Snapped attribute the syntax is <VO Name>.<Hitbox Name> where the VO Name is the string given when selected with the selection tool.
How to Author a Highlight Action in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Highlight.
Press the + button to add the state to the action list.
Select the entity you wish to highlight from the dropdown. This will be populated with every VO and VP in your space.
How to Author a Text Message Display in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Display Message.
Press the + button to add the state to the action list.
Enter the message you want displayed in the text field.
If you wish the message to be spoken select the Spoken field.
If the Spoken field is selected you can also choose the voice that will speak the phrase. Please note, that if the message is spoken it will not move on to the next state in the sequence (if there are multiple) will not occur until the message is finished being spoken by the system.
How to Author an Animation Playing in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Play Animation.
Press the + button to add the state to the action list.
Select the entity from the dropdown. Any VO can be selected at this point regardless of whether it has an animation on it or not.
Select the Animation from the dropdown. This will only be populated if an animation exists on the selected entity.
If you only want to play part of an entire animation, you can select the Sub Clip field. This will allow you to utilize the Start Time and End Time fields to control which frames of the animation will play.
How to Author a Sound Cue in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Play Audio.
Press the + button to add the state to the action list.
From the dropdown select your desired audio clip.
Set the Volume value, somewhere between the range of 0 to 1 to change the volume at which the Audio Clip will be played at.
You can set a delay (in seconds) that you want to wait for before the audio clip plays with the Delay field.
You can preview the audio with the selected volume settings by pressing the Preview Sound button.
How to Author a Follow Behavior in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type Follow.
Press the + button to add the state to the action list.
The Follower selection is the object that will track the location of the Followee and adjust its position and rotation relative to the Followee. Any object in the space can be selected as a Follower and the same is true of the Followee with the added selection of the player being an option.
Select whether you want the object to start following in this state or stop following by selecting the Is Follow selection. If this is selected it will start following and if it is deselected it will stop if it was following previously.
Set the offset that you would like the Follower to adhere to with the position and rotation values. This is the position and rotation relative to the Followee.
Please be aware that objects that follow will still adhere to physics and any other parameters that are left on (like gravity). Please use other state actions to customize this effect further if these are not the end results that you desire.
How to Author a Quiz in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type QMultiple.
Press the + button to add the state to the action list.
Press the Expand Choices button to type in your question prompt and any answers to the prompt. If you would like to delete any provided answer, press the Trash button to delete it. You can select one of the options to be evaluated as correct in this menu as well.
Your QMultiple state will update to reflect your Question prompt.
If you want the prompt to be spoken to the user, select the Spoken check mark box.
How to Author a Simulation Transfer in the State Machine
A detailed explanation of controls and interface functions are described in the section State Machine Builder User Interface.
Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
Click on the desired state and from the dropdown in either the entry or exit actions select the type GoToSim.
Press the + button to add the state to the action list.
From the dropdown of the dropdown you will see a list of every simulation that you currently have access to. Whether you have created or have it shared with you.
When this state is triggered the Experience User will be given an option to go to the selected simulation. Saying “No” to this dialogue will dismiss this option.
Please be certain that anyone that you share a simulation with also has any simulation shared with them that is connected to it with this functionality or else there may be an error for the Experience User.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article