OnOverlap If (not IsValid(factory)) IsEmptyError() else item = Factory.NewItem(itemType,itemQuality) item.SetLocation(MakeRandomLocation());
IsEmptyError() Print "Add a factory to ", GetDisplayName(self);
MakeRandomLocation return RandomPointInBoundingBox(box);
NewItem(typeToBuild, qualityToBuild)save type and quality as local variables. // to clean up the graph.
newItemType = typeToBuild if (typeToBuild == random) { newItemType = PickRandomType() }
switch(typeToBuild) { case Health: case Damage: case Random: // should never occur returnValue = SpawnActor(ClassList[typeToBuild]) break case Ammo: returnValue = AmmoFactory.NewAmmo(qualityToBuild); }
return returnValue;