Blueprint to C++ and Engine Freezing?

There are better ways to write this code - but I’ll keep it explicit so you can see what’s going on - Directly from your blueprint code

const int LocationFoundAtIndex = UsedLocations.Find(Location); //<-Saves the index you found
if(LocationFoundAtIndex == -1)
{
//Do Something
}
else
{
 SpawnLocation = Location;
 UsedLocations.Add(SpawnLocation);
}
1 Like