Basic Mission Making Tutorial 03 - Spawning actors, weapons and controlling AI

In the third lesson of this tutorial I'll describe how to spawn actors and dropships loaded with actors. You'll learn how to basically manipulate the AI and tell actors to do what you want. You need to check Scenes/Scripts/MissionTut_03.lua for changes. I removed some already unnecessary comments from the code. You should also check out the Scenes/MissionTut_03.ini to see how you give weapons to added actors. You should NEVER drop weapons near actors for released missions. That's ok when you develop and debug, but once you have it released dropped weapons can lead to fail. The problem is that AI is unpredictable and you can't always guarantee that actors will take weapons. You can't also add more that one weapon this way. Game editors (no matter what you edit: scenes or areas) usually erase manually added weapons from <scene name>.ini file when you save them. You better place all actors at the end of the added objects in scene .ini, add weapons, select all troops and save them to separate text file. After each edit you can just copy-paste your troops from this backup file, just don't forget to alter it if you change troops positions. The end of the added objects in this .ini file is just before the AddBackgroundLayer statements. Now download attached mission and enjoy reading the code.