top of page
Scripting
The Walkers

Design the state machine for the commun enemies
- Point out the actions of the enemies
- Propose differents states
- Development of a structure
- Creating a schema
While programming the enemies state machine, I had to make sure that the fields in Unity's inspector were already assigned or otherwise clear and simple for the level designers to use.
Another part of my job was to give them a lesson on how to make enemies work wwell and write documentation for them.
Code example

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Code Base State Machine
At each change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.
-------------------------------------------------- -------------------------------------------------- -------
Every change of state, all coroutines are stopped and the Start() of the new state is called.

Idle State Code
Switch to state Patrol and stop Idle animation.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.
The PlayerSeen() function allows to change the state to Scream if the player is detected and no other Walker in the group has shouted.
-------------------------------------------------- -------------------------------------------------- -------
Change to Patrol state and stopped the Idle animation.
The function PlayerSeen() changes the state for Scream if none of the Walkers in the group has already scream.

Patrol State Code
Patrol state allows the Walker to move from waypoint to waypoint.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.
These waypoints are placed by the level designers in the levels.
-------------------------------------------------- -------------------------------------------------- -------
This state allows the Walkers to move from one waypoint to another. Those waypoints are set in levels by level designers.

Chase State Code
All Walkers in the same group are in Chase when one of them has shouted.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.
They move towards the player and when close enough their state changes to Attack.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker screams, all of the Walkers in his group enter Chase state.
They all head for the player and when they are close enough, they attack.

Code Scream State
When the player is detected by a Walker, his state is changed to the Scream state.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.
The Walker informs his manager that he shouted for the latter to send all the walkers in the group in pursuit of the player.
-------------------------------------------------- -------------------------------------------------- -------
When a Walker detects the player, his state changes to Scream.
The Walker sends the information to his manager.
The manager sends all the Walkers in the group to chase the player.

Ingredients
The ingredients I worked on are used in puzzles.
- Wind
- Mannuel shutters
- Crate
- Bookcase
To script the ingredients, I started by thinking of the logic I want to implement.
After testing the ingredients in my gym and make sure they work fine, I created some prefabs for the level designer.
From this moment, I had to show them how to integrate the ingredients in Unity.
I waited for their feedbacks to modify them.
At the end of the production, we were in the polish phase.
I worked on each ingredient to bring them to their final version.
Code example

Vent ingredient code
Since the wind is placed by the level designers in their levels, the Header is useful to tell them what to do.
The variables are ordered with clear names for ease of reading the code.
The variables are ordered with clear names for ease of reading the code.

Ingredient code Vent continued
I implemented the wind so that at the time of the Start(), a box collider is created. The latter begins at the window and ends at the first wall it touches.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.

Ingredient code Vent continued
When an element that can interact with the wind enters its box collider, several results are possible.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.

Inspector for level designers
When creating the wind prefab, I made sure that all the inspector fields were properly assigned.
The header and variable names make it easy to understand.
The header and variable names make it easy to understand.

Ingredient code Section
A very simple code that allows you to close shutters to block the wind.
A timer is started to allow the shutters to open again.
A timer is started to allow the shutters to open again.

Ingredient code Library
This code allows you to move a bookcase in 4 directions.

Ingredient code Library continued
Here, for example, is the code for moving forward.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.

Ingredient code Library continued
The same here but the code is adapted for moving to the right.

Vent ingredient code
Since the wind is placed by the level designers in their levels, the Header is useful to tell them what to do.
The variables are ordered with clear names for ease of reading the code.
The variables are ordered with clear names for ease of reading the code.

Ingredient code Vent continued
I implemented the wind so that at the time of the Start(), a box collider is created. The latter begins at the window and ends at the first wall it touches.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.

Ingredient code Vent continued
When an element that can interact with the wind enters its box collider, several results are possible.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.

Inspector for level designers
When creating the wind prefab, I made sure that all the inspector fields were properly assigned.
The header and variable names make it easy to understand.
The header and variable names make it easy to understand.

Ingredient code Section
A very simple code that allows you to close shutters to block the wind.
A timer is started to allow the shutters to open again.
A timer is started to allow the shutters to open again.

Ingredient code Library
This code allows you to move a bookcase in 4 directions.

Ingredient code Library continued
Here, for example, is the code for moving forward.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.

Ingredient code Library continued
The same here but the code is adapted for moving to the right.

Vent ingredient code
Since the wind is placed by the level designers in their levels, the Header is useful to tell them what to do.
The variables are ordered with clear names for ease of reading the code.
The variables are ordered with clear names for ease of reading the code.

Ingredient code Vent continued
I implemented the wind so that at the time of the Start(), a box collider is created. The latter begins at the window and ends at the first wall it touches.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.

Ingredient code Vent continued
When an element that can interact with the wind enters its box collider, several results are possible.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.

Inspector for level designers
When creating the wind prefab, I made sure that all the inspector fields were properly assigned.
The header and variable names make it easy to understand.
The header and variable names make it easy to understand.

Ingredient code Section
A very simple code that allows you to close shutters to block the wind.
A timer is started to allow the shutters to open again.
A timer is started to allow the shutters to open again.

Ingredient code Library
This code allows you to move a bookcase in 4 directions.

Ingredient code Library continued
Here, for example, is the code for moving forward.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.

Ingredient code Library continued
The same here but the code is adapted for moving to the right.

Vent ingredient code
Since the wind is placed by the level designers in their levels, the Header is useful to tell them what to do.
The variables are ordered with clear names for ease of reading the code.
The variables are ordered with clear names for ease of reading the code.

Ingredient code Vent continued
I implemented the wind so that at the time of the Start(), a box collider is created. The latter begins at the window and ends at the first wall it touches.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.
In his FixedUpdate(), if the switchoff variable becomes true his VFX is disabled to indicate that the wind has been blocked.

Ingredient code Vent continued
When an element that can interact with the wind enters its box collider, several results are possible.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.
- The torch is extinguished
- Manual flaps block the wind (switchoff becomes true)
- Ice blocks block the wind (switchoff becomes true)
- Libraries block wind (switchoff becomes true)
There is also the opposite of possible. When an object that can block the wind is no longer in the boxcollider, the wind returns.

Inspector for level designers
When creating the wind prefab, I made sure that all the inspector fields were properly assigned.
The header and variable names make it easy to understand.
The header and variable names make it easy to understand.

Ingredient code Section
A very simple code that allows you to close shutters to block the wind.
A timer is started to allow the shutters to open again.
A timer is started to allow the shutters to open again.

Ingredient code Library
This code allows you to move a bookcase in 4 directions.

Ingredient code Library continued
Here, for example, is the code for moving forward.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.
A raycast is used to check if there is an object in the path or not.
If there is no object in the path, then the bookcase can move 1m15 (one full move).
On the other hand, if there is an object in the path, the movement will be shorter to ensure that the library does not fit inside.

Ingredient code Library continued
The same here but the code is adapted for moving to the right.
bottom of page