Hello, essentially what I wish to do is this; I wish to create two BlueprintCallable functions, one to take input and return a Tile object, the other to take a Tile object and return output. (Basically like make/break vectors) Because I couldn’t find a way of creating a class that would act as a simple data container by normal means, I am using an Actor as the parent class. The issue is the
, because I’m using these functions within the level blueprint, it’s giving me the error
My first function, MakeTile is meant to take in two int32s and a bool as input, but instead it takes those and
“Target [self]” So am I going about this the wrong way, or is there just some sort of way of removing “Target [self]” that I’m not aware of? I’m using two classes, a BlueprintFunctionLibrary called TileLib and an Actor called Tile. (I have tried storing the functions within Tile too, same result)
–Make Tile in BP
–Break Tile in BP
–Tile .h
–Tile.cpp
–TileLib.h
^ It shows an error but compiles completely fine, so I don’t know why.
–TileLib.cpp
I also have no idea why the input in BP is labeled as “T” instead of “Tile To Break”
Thanks for reading. I’ve probably made some idiotic mistake, but for the life of me I can’t figure it out.
So, that worked perfectly to remove the “Target [self]” but now I have a new issue. Whenever I run it, within the MakeTile BP function, it throws an error during run-time and crashes ue4. The stacktrace led me to this line
I can’t follow the stacktrace, I’ve searched a few things about it but can’t seem to find any results (After searching for only 30 mins, I’m going to keep searching, but do you know why this is?)
There was no reason they were not UProperties, they are now. Doesn’t change the issue I currently have with instantiating a new ATile for returning, but thanks for pointing that out.
It just occurred to me! This is an ACTOR I’m using, it doesn’t make sense to instantiate it, I need to spawn it in. The only issue then is I don’t actually want the actor in the physical world, so is there an alternative class I should use?