ObjectTemplate.SetRandomGeometries

From Pilot_51's Wiki
Jump to navigation Jump to search

MDT description

This property sets the number of objects to choose from when the object is spawned. It modifies the name used in an AddTemplate property definition. Typically it is used for choosing a different head for a soldier from a few different ones.

For example, for the British soldier definition in objects/Soldiers/BritishSoldier/Objects.con there are the lines:

ObjectTemplate.addTemplate BritSoldierComplexHead
ObjectTemplate.setRandomGeometries 3

Later in the file are the lines:

ObjectTemplate.create AnimatedBundle BritSoldierComplexHead1
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/BritComplexHead1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.create AnimatedBundle BritSoldierComplexHead2
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/BritComplexHead2
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.create AnimatedBundle BritSoldierComplexHead3
ObjectTemplate.createSkeleton animations/UsFace.ske
ObjectTemplate.geometry Soldier/BritComplexHead3
ObjectTemplate.hasDynamicShadow 1

The added template name, BritSoldierComplexHead, will then have the number 1, 2, or 3 appended to it at random when the object appears, which will choose which head name to use.

Source and more details

Additional Description