michaelm75au
Posts: 13500
Joined: 5/5/2001 From: Melbourne, Australia Status: offline
|
Quick and dirty way math.randomseed(os.time()) math.random(); math.random(); math.random() r = 1 repeat a = ( math.random( 1, 100 ) ) r = r + 1 until( r > 10 ) if a<30 then local u = ScenEdit_AddUnit({type = 'Facility', side = 'Huthi Rebels', name = 'Old Tank', dbid = 813, latitude='13.3421119994231', longitude='44.4575266120756', size=1}) ScenEdit_UpdateUnit({guid=u.guid, mode='remove_mount', dbid=1053}) ScenEdit_UpdateUnit({guid=u.guid, mode='remove_mount', dbid=1053}) ScenEdit_UpdateUnit({guid=u.guid, mode='remove_mount', dbid=1053}) elseif a>=30 and a<70 then ScenEdit_AddUnit({type = 'Facility', side = 'Huthi Rebels', name = 'Elite Fighters', dbid = 3001, latitude='13.4361864266395', longitude='44.5714532192344', proficiency = 'Veteran'}) elseif a>=70 then ScenEdit_AddUnit({type = 'Facility', side = 'Huthi Rebels', name = 'Old ZSU', dbid = 909, latitude='13.392123409137', longitude='44.495733037447'}) end
_____________________________
Michael
|