Code: Select all
var Vector SpawnLocs[4096];
...
function PostBeginPlay() {
...
for (N = Level.NavigationPointList; N != NONE; N = N.NextNavigationPoint)
if ((N.IsA('PathNode') || N.IsA('SpawnPoint') || N.IsA('PlayerStart')) && (!N.Region.Zone.bWaterZone || !N.Region.Zone.bPainZone))
(... filling your SpawnLocs array here ...)
forEach AllActors(class'Inventory', Inv)
if ((!Inv.Region.Zone.bWaterZone) && (!Inv.Region.Zone.bPainZone))
(... additionally filling your SpawnLocs array here ...)
Code: Select all
for (N = Level.NavigationPointList; N != NONE; N = N.NextNavigationPoint)
if ((N.IsA('PathNode') || N.IsA('SpawnPoint') || N.IsA('PlayerStart') || N.IsA('InventorySpot')) && (!N.Region.Zone.bWaterZone || !N.Region.Zone.bPainZone))
(... filling your SpawnLocs array here ...)
And another suggestion: for setting properties as text I use an extended version:
SetPropertyTextEx
Code: Select all
static function bool SetPropertyTextEx(Object obj, coerce string PropName, coerce string PropValue) {
/*******************************************************************************
Does the same as *SetPropertyText* but logs a warning if function failed.
*******************************************************************************/
Obj.SetPropertyText(PropName, PropValue);
if (Obj.GetPropertyText(PropName) != PropValue)
{
warn(obj $ ".SetPropertyText(" $ PropName $ "=" $ PropValue $ ") faild for" @ obj $", current property value=\"" $ Obj.GetPropertyText(PropName) $ "\"");
return false;
}
else
return true;
}
Just my 2 ct.