
09-26-2002, 05:32 PM
Game scripts are generally event driven, so their flow of control and when they're called have a lot to do with what is occuring in the map.
The map script is first called when the server loads the map, but before anything (including spawning) happens. When it runs after that depends on what is in the script, usually based on some event or trigger (ie when the player activates the bomb, run this part of the script, etc.). Some parts of the script will run continously while the map is active - this is how things like DogMeat's DMZDogTag are possible.
Some elements of the game are part of the map, such as spawn points. It is not necessary for the script programmer to have to handle every little detail (and thus keep his sanity). The downside to this is that some elements of a map cannot be manipulated in script. They can only be changed in the mapping tool and must be compiled. This has a lot to do with the graphics and performance, too, but it does limit some of the things you can accomplish in a script.
But the behavior of spawn points is controlled by the map and cvars. Scripts can modify cvars, so they can in some ways impact spawn points. But I don't know if you can dynamically create / destroy spawn points in script. Some of the mappers that hang around here can probably answer that one.
|