Strange that no one has proposed it earlier but Spearhead has 'getmins' and 'getmaxs' commands for the Entity class which returns
the minimum and maximum setsize options respectively. This is because the original 'setsize' command only sets vectors so in AA we'd
have to do something like this (Elgan's algorithm by the way) to get the values again:
Would this be hard to do? I mean, the vectors are just stored internally on entities of the Entity class and all its children classes alike.Code:GetBBox local.object: if (local.object == NIL && self != NULL) local.object = self else if (local.object == NIL && self == NULL) end local.fwd = waitthread getbound 1 ( 1 0 0 ) local.object local.bwd = waitthread getbound 0 ( 1 0 0 ) local.object local.right = waitthread getbound 1 ( 0 1 0 ) local.object local.left = waitthread getbound 0 ( 0 1 0 ) local.object local.up = waitthread getbound 1 ( 0 0 1 ) local.object local.down = waitthread getbound 0 ( 0 0 1 ) local.object local.BBox[0] = ( -local.bwd -local.left -local.down ) local.BBox[1] = ( local.fwd local.right local.up ) end local.BBox getbound local.dir local.vector local.model: local.item = spawn script_origin origin local.model.origin local.item.angles = local.model.angles local.item setsize ( 0 0 0 ) ( 0 0 0 ) for(local.i = 0;local.item istouching local.model; local.i++) { if(local.dir == 1) { local.item.origin += local.vector * 1 } else { local.item.origin -= local.vector * 1 } } local.item delete local.i = ( local.i * local.model.scale + 6) - 11.5 end local.i