Create story script
From XStoryPlayer Wiki
In this tutorial we will add some scripting: Give feedback to player, make the doors open when a specific event occurs, let female alien walk by.
- We don't want the doors to open automatically. We need to make the doors objects that can be driven by the script.
Open the/init/story/scenes.dat</li> file and add:
door_objecti CELL1 { rotate = false; // Door translates q = 4.5; // Open height q_min = 0.0; // Min height q_max = 6.0; // Max height q_spring = 20.0; // Spring used for opening door open = true; // Door status obj_name = "cell1"; // Object in scene that is the door } door_objecti CELL2 { rotate = false; q = 4.5; q_min = 0.0; q_max = 6.0; q_spring = 20.0; open = false; obj_name = "cell2"; }
This will make a door object from the scene object. Now we can also open the door using a script. </li> </ol>