This is an old revision of the document!
Start Page » DragonScript Scripting Language » Abstraction Layers: How you want to build your Game » Behavior Elements » ECABehaviorRandomizeGeometry
Attachable element behavior randomizing geometry of element.
Upon adding the behavior to an element the geometry of the element is randomized. After this point the behavior has no effect anymore and can be removed if desired.
Main use for this behavior though is using attachable behavior factory by adding the behavior to an element in the world editor. Used this way the randomization is applied during factory create behavior call without actually adding the behavior to the element. This way the randomization is applied once during element instantiation without keeping the behavior around. Randomization uses element stub properties with prefix randomizeGeometry.. Randomization is applied relative to the current element geometry.
Element class properties have the prefix randomizeGeometry..
Move element by a random amount from the range -position to position.
randomizeGeometry.position(0, 0, 0)<vector name='randomizeGeometry.position' x='0.2' y='0' z='0.2'/>
Move element by a random amount from the range -positionMinimum to positionMaximum. If present randomizeGeometry.position is ignored.
randomizeGeometry.positionMinimum(0, 0, 0)<vector name='randomizeGeometry.positionMinimum' x='-0.2' y='0' z='-0.2'/>
Move element by a random amount from the range -positionMinimum to positionMaximum. If present randomizeGeometry.position is ignored.
randomizeGeometry.positionMaximum(0, 0, 0)<vector name='randomizeGeometry.positionMaximum' x='0.2' y='0' z='0.2'/>
Rotate element by a random amount in degrees from the range -rotation to rotation.
randomizeGeometry.rotation(0, 0, 0)<vector name='randomizeGeometry.shift' x='0' y='20' z='0'/>
Rotate element by a random amount in degrees from the range -rotationMinimum to rotationMaximum. If present randomizeGeometry.rotation is ignored.
randomizeGeometry.rotationMinimum(0, 0, 0)<vector name='randomizeGeometry.rotationMinimum' x='' y='-20' z='0'/>
Rotate element by a random amount in degrees from the range -rotationMinimum to rotationMaximum. If present randomizeGeometry.rotation is ignored.
randomizeGeometry.rotationMaximum(0, 0, 0)<vector name='randomizeGeometry.rotationMaximum' x='0' y='20' z='0'/>
Uniformly scale element by a random amount from the range 1-scale to 1+scale. The value is thus the percentage to increase/decrease the scaling. For example a value of 0.1 increases/decreases the scaling of the element by up to 10%.
randomizeGeometry.scale0<float name='randomizeGeometry.scale'>0.1</float>
Uniformly scale element by a random amount from the range 1-scaleMinimum to 1+scaleMaximum. The value is thus the percentage to increase/decrease the scaling. For example a value of 0.1 increases/decreases the scaling of the element by up to 10%. If present randomizeGeometry.scale is ignored.
randomizeGeometry.scaleMinimum0<float name='randomizeGeometry.scaleMinimum'>-0.1</float>
Uniformly scale element by a random amount from the range 1-scaleMinimum to 1+scaleMaximum. The value is thus the percentage to increase/decrease the scaling. For example a value of 0.1 increases/decreases the scaling of the element by up to 10%. If present randomizeGeometry.scale is ignored.
randomizeGeometry.scaleMaximum0<float name='randomizeGeometry.scaleMaximum'>-0.1</float>
This behavior does not required other behaviors.
This behavior does not support optional behaviors.
This behavior does not required element class to be persistable (setPersistable).
Since DragonScript Module Version 1.29