I am not removing the unique location nor unique transform of the container, I remove the random item place in one of the container in item group which has 5 containers , and place corresponding ammo type the weapon in the group.
the item removed will have chance to hit again and spawn in another group
My opinion is based only on the code you showed(in another thread)
I;m little confused, because what you wrote is contrary to what can be read in the code.
You need to overload the == operator for transforms. Iād declare this function in some kind of namespace so you donāt step on other declarations if you encounter any.
That one will decide equivalence only based off of locations. In which case, if you donāt care about rotations for what you are doing I would just switch now to using FVectors for locations because they already have an == operator and they have a smaller footprint.
I would declare this in the header of the class that needs it to keep it within a namespace
Sir this I have already, (Ftransfrom == Ftransform) the issue is need to do something to find the index of the array like Index = FCustomThunkTemplates::Array_Find(TransformArray, Location);
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);
}
this is the full error binary '==': no operator found which takes a left-hand operand of type 'const FTransform' (or there is no acceptable conversion)
You probably donāt have an == operator for the CONST version of FTransform. You can either remove the const on const FTransform where the error is or add another operator for == for the const version of FTransform.