I am a blueprint expert , now learning C++ on my own blueprint conversion
I feel more expert on blueprint when converted some of my bp scripts
I learned many things are very simple in C++ and many are very simple in bp
Your only way to learn everything is for me and other guys to come here and give you everything on a silver plate and that is far from fair. Because that is the only way to learn blueprint to C++ , with our efforts.
Make an effort to do things in C++ the normal way, not blueprint to → C++
Youtube is full of C++ stuff for unreal, possitions, setting them, converting them, you have to spend time to view them all, they contain how to import classes with components with Tsubclasof and so on.
Forgot to mention it, getworld is mostly for spawing things from another class.
and other settting directly related to setting things on those objects has nothing to do with getworld(), the component has , not the getworld.
THink of get world as a spawner, and the component as setting things on the object you are spawning.
the problem on youtube is wasting so much time, the guy teaching something actually learning himself, an expert C++ dev will not sit on youtube because he have to do his own work and job. I watched many tutorials on youtube and found them useful for beginners like me but they are wasting so much time, speaking extra things, they think we are interested to know what they eat in morning … so on
thank you for information, and i am right at that point, i am spawning group actor using gamemode class
because you are comparing by the location transforms float values, instead you need to compare by index
once you generate a random index then check if the index is available, set it and add it to the used locs.
hope it helps
cheers!
This is a long post and has moved on since the original question, but the initial error was due to the Find function comparing the two elements via ==, but FTransform has no operator overload for ==. You can solve this by defining your own external equality operator:
bool operator==(const FTransform& t1, const FTransform& t2)
{
return t1.Equals(t2, .0001f);
}
Thank You for helping and where to define it ? in which class
Sir i tried this library over 100 times and its not working, it need to overload operator
I will still need to overload it, possible I will need FTransform again in the future