RandomMoveArrayOfObjects

From scripting
Revision as of 19:49, 24 April 2017 by Nickpisca (talk | contribs) (Created page with " global proc RandomMoveArrayOfObjects(string $NameList[], float $MaxVal) { //Author Nick Pisca 0001d 2008 for ($x=0;$x<size($NameList);$x++) { if (`objExists $NameList[$...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
global proc RandomMoveArrayOfObjects(string $NameList[], float $MaxVal) {
//Author Nick Pisca 0001d 2008
	for ($x=0;$x<size($NameList);$x++) {
		if (`objExists $NameList[$x]`) {
			float $RandX = rand(-$MaxVal, $MaxVal);
			float $RandY = rand(-$MaxVal, $MaxVal);
			float $RandZ = rand(-$MaxVal, $MaxVal);
			
			move -r $RandX $RandY $RandZ $NameList[$x];
		}
	}
}


More information on translate tranformations, read pages 55-67 in YSYT.

See also RandomMoveArrayOfObjectsinXY