SpawnArgs

The term spawnArgs (or spawn arguments ) refers to a dictionary - a list of key/value pairs - that an entity uses to set up attributes or define behavior.

The spawnArgs dictionary is defined in the base spawn class idEntity . Thus all spawn classes gain it via inheritance.

It is filled when an entity is spawned with the entityDef type and also the map entity dictionary. So it provides an easy way for a developer to modify aspects of the entity.

It is most commonly accessed by the entity via its spawn class or script object , but it may also be accessed via game logic, another entity, or level script. However, it should be noted that the most efficient use is to only read the values at entity spawn into variables.

In scripting the getKey script events are used to access spawnArgs.