- Text Editor menu >> Name box
- You don't have to rename it Movie.py
- You can leave as Movie.txt
Select the Plane named Movie_Screen
Logic Editor >> Sensors >> Add Sensor >> Always
Activate TRUE level triggering (pulse mode)
You don't have to use an Always sensor. You can use any sensor you want.
Movie.py needs to be run with every frame.
Activating TRUE level triggering runs Movie.py every frame.
- Logic Editor >> Controllers >> Add Controller >> Python
- Execution Method: Script
- You need a Python Controller to run a python script
Logic Editor >> Controllers >> Python Controller
Script >> Script List >> Movie.py
- Earlier, we opened Movie.txt in the Text Editor
- That added Movie.txt (named to Movie.py) to the game engine's python script list
- Logic Editor menu >> View >> Properties
- Properties tab >> Add Game Property button
- We are adding the material name and the movie name/path as python variables (game properties).
- This way we can use one (and only one) python script for all the movie screens in the game.