# Random Point In Region

Grammar — Random point in r
FlagsNative | Function

Returns a random point in the specified region. For regions with multiple shapes, this is not guaranteed to work.

# Arguments

  • region — Region

Returns — point

native point RegionRandomPoint(region r);

Category: Region / Modification

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L1746
RegionRandomPoint(RegionFromId(28))
// L1747
RegionRandomPoint(RegionFromId(29))
// L7262
RegionRandomPoint(lv_region)
// L447
RegionRandomPoint(RegionCircle(lp_target, 1.0))
// L1253
RegionRandomPoint(RegionFromId(37))
// L1254
RegionRandomPoint(RegionFromId(37))
// L1255
RegionRandomPoint(RegionFromId(37))
// L1414
RegionRandomPoint(RegionFromId(14))
// L4449
RegionRandomPoint(RegionFromId(16))
// L6408
RegionRandomPoint(RegionFromId(19))
// L6414
RegionRandomPoint(RegionFromId(26))
// L6415
RegionRandomPoint(RegionCircle(PointFromId(1328), 8.0))
// L6424
RegionRandomPoint(RegionFromId(26))
// L457
RegionRandomPoint(lp_spawnRegion)
// L4923
RegionRandomPoint(RegionFromId(44))
// L4941
RegionRandomPoint(RegionFromId(45))
// L4949
RegionRandomPoint(RegionFromId(45))
// L5264
RegionRandomPoint(RegionFromId(29))
// L5266
RegionRandomPoint(RegionFromId(30))
// L5268
RegionRandomPoint(RegionFromId(31))
// L5270
RegionRandomPoint(RegionFromId(32))
// L5272
RegionRandomPoint(RegionFromId(33))
// L5274
RegionRandomPoint(RegionFromId(35))
// L6009
RegionRandomPoint(RegionFromId(4))
// L6010
RegionRandomPoint(RegionFromId(4))
// L6011
RegionRandomPoint(RegionFromId(4))
// L6012
RegionRandomPoint(RegionFromId(5))
// L6013
RegionRandomPoint(RegionFromId(5))
// L6014
RegionRandomPoint(RegionFromId(6))
// L6015
RegionRandomPoint(RegionFromId(6))
// L6016
RegionRandomPoint(RegionFromId(26))
// L6017
RegionRandomPoint(RegionFromId(26))
// L6018
RegionRandomPoint(RegionFromId(27))
// L311
RegionRandomPoint(gv_infestationRegion[lp_colony])
// L319
RegionRandomPoint(gv_infestationRegion[lp_colony])
// L335
RegionRandomPoint(RegionCircle(UnitGetPosition(gv_infestationVirophageUnit[lp_colonyIndex]), 5.0))
// L785
RegionRandomPoint(RegionCircle(RegionGetCenter(gv_infestationRegion[lv_colonyIndex]), lv_sPAWN_RADIUS))
// L836
RegionRandomPoint(RegionCircle(RegionGetCenter(lp_locale), 2.0))
// L4005
RegionRandomPoint(RegionFromId(6))
// L4008
RegionRandomPoint(RegionFromId(6))
// L4217
RegionRandomPoint(RegionFromId(55))
// L4220
RegionRandomPoint(RegionFromId(55))
// L4273
RegionRandomPoint(RegionFromId(9))
// L2300
RegionRandomPoint(RegionCircle(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[RandomInt(1, gv_trainList[lv_trainIndex].lv_lastCar)]), 2.0))
// L2305
RegionRandomPoint(RegionCircle(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[RandomInt(1, gv_trainList[lv_trainIndex].lv_lastCar)]), 2.0))
// L2312
RegionRandomPoint(RegionCircle(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[lv_trainMidPoint]), 2.0))
// L1858
RegionRandomPoint(RegionFromId(28))
// L1863
RegionRandomPoint(RegionFromId(32))
// L1910
RegionRandomPoint(RegionFromId(33))
// L1957
RegionRandomPoint(RegionFromId(34))
// L2064
RegionRandomPoint(RegionFromId(29))
// L2068
RegionRandomPoint(RegionFromId(36))
// L2116
RegionRandomPoint(RegionFromId(37))
// L2163
RegionRandomPoint(RegionFromId(35))
// L2226
RegionRandomPoint(RegionFromId(38))
// L2274
RegionRandomPoint(RegionFromId(40))
// L7138
RegionRandomPoint(RegionFromId(31))
// L7144
RegionRandomPoint(RegionFromId(31))
// L7149
RegionRandomPoint(RegionFromId(3))
// L7155
RegionRandomPoint(RegionFromId(3))
// L7160
RegionRandomPoint(RegionFromId(33))
// L7166
RegionRandomPoint(RegionFromId(33))
// L7171
RegionRandomPoint(RegionFromId(5))
// L7176
RegionRandomPoint(RegionFromId(39))
// L4502
RegionRandomPoint(RegionFromId(126))
// L4509
RegionRandomPoint(RegionFromId(126))
// L9206
RegionRandomPoint(RegionFromId(52))
// L9484
RegionRandomPoint(RegionFromId(112))
// L9492
RegionRandomPoint(RegionFromId(51))
// L9500
RegionRandomPoint(RegionFromId(47))
// L9508
RegionRandomPoint(RegionFromId(103))
// L9516
RegionRandomPoint(RegionFromId(55))
// L9524
RegionRandomPoint(RegionFromId(56))
// L9532
RegionRandomPoint(RegionFromId(57))
// L2503
RegionRandomPoint(RegionFromId(94))
// L2783
RegionRandomPoint(RegionFromId(17))
// L3064
RegionRandomPoint(RegionFromId(23))
// L3067
RegionRandomPoint(RegionFromId(23))
// L3070
RegionRandomPoint(RegionFromId(23))
// L3078
RegionRandomPoint(RegionFromId(60))
// L3081
RegionRandomPoint(RegionFromId(60))
// L3084
RegionRandomPoint(RegionFromId(60))
// L5810
RegionRandomPoint(RegionFromId(25))
// L5815
RegionRandomPoint(RegionFromId(25))
// L3277
RegionRandomPoint(RegionFromId(6))
// L3337
RegionRandomPoint(RegionFromId(10))
// L3397
RegionRandomPoint(RegionFromId(13))
// L5177
RegionRandomPoint(RegionFromId(6))
// L5181
RegionRandomPoint(RegionFromId(6))
// L5185
RegionRandomPoint(RegionFromId(7))
// L5189
RegionRandomPoint(RegionFromId(7))
// L5437
RegionRandomPoint(RegionFromId(8))
// L5438
RegionRandomPoint(RegionFromId(12))
// L5442
RegionRandomPoint(RegionFromId(10))
// L5443
RegionRandomPoint(RegionFromId(20))
// L5448
RegionRandomPoint(RegionFromId(9))
// L5449
RegionRandomPoint(RegionFromId(31))
// L1238
RegionRandomPoint(gv_critterHavens[lv_index])
// L5124
RegionRandomPoint(RegionFromId(64))
// L5129
RegionRandomPoint(RegionFromId(66))