The problem with the above example is that the text quickly disappears. Now we will be fixing that. First go back to the 'Edit ZScript' window and change the name of the script from "Init" to "HelloWorld":

Code:
global script HelloWorld
Also make sure DrawString is called in a loop:

Code:
		while(true) {
			Screen->DrawString(layer, x, y, font, color, format, bg_color, str, opacity);
			Waitframe();
		}
Now recompile. Then in the Assign Compiled Script window, in the Global tab:

  1. Select "Active:" in the left listbox
  2. Select "HelloWorld" in the right listbox
  3. Click '<<'
  4. Click 'OK' - the script should be successfully loaded into the slot
  5. Test again; the text should stay underneath the subscreen now