Zoe - Launching an action
Tutorial
·
Beginner
·
+10XP
·
5 mins
·
(30)
Unity Technologies

After setting basic parameters on objects now we'll start programming some actions to be triggered.
Languages available:
1. About interactions
So far you have been able to interact with objects without even programming anything. But the core of Zoe is actually programming what we call ‘Interactions’. An interaction is a behaviour that triggers actions when given conditions have been met. They can be linked to one another to create chain reactions.
As you remember from the structure of an IO, there is a section/node called Interactions. Inside it there is an Empty interaction which you can duplicate to create all the interactions you need.
IO Structure
Interactions can be created directly inside the objects they act on but you can also create Empty objects that act as managers of other objects. It is flexible enough for you to decide the best way to organise your project.
Now let’s check the settings of an interaction. In this third activity we are going to make the propeller of the turbine rotate. Select the 'Propeller' inside 'Activity3' in the Hierarchy and convert it into an Interactive Object.
Then under the Interactions, select the 'Empty' one. In the Inspector window you can see the Interaction Setup:
Interaction Setup
- Dependencies allow you to activate interactions one after the other.
- Delay adds a waiting time after dependencies (or after the start of the experience).
- Repeat is for keeping an interaction in loop as by default it only triggers once.
- Deactivate allows for example to disable “branches” of interactions inside an experience depending on choices made by the user or to disable an interaction after some time to create a challenging game mechanic.
For more details you can check the documentation here.
2. Using the 'Rotate' action
We are going to make the turbine rotate a few seconds after the scene has started.
Under the Interactions, duplicate the Empty one (Ctrl + D) and rename the new one into TurbineRotates, for example.
Inside the Interaction Setup add a delay of about 5 seconds:
Interaction delay
Then go to the ADD ACTION list and select Rotate:

Rotate action
Under ‘Object(s) to rotate’ drag Propeller(IO). We want the propeller to rotate around its Z axis, doing a 360° rotation every three seconds ( more or less depending on the speed you want it to have). Check also ‘Loop’ so the rotation keeps looping:
Propeller rotation
Now you can press 'Play' and look at the propeller, it should start rotating after 5 seconds.