So im a bit confused. Im have made games before but not 3D games. I used AS3 (Flash) php and Java. I know nearly nothing about c++. My team mate also knows about programming but is not at all in c++. So we began our game with blueprints.
For Data that is fixed there are the data tables that seem to be some kind of database so that is fine. All elements in the scene we have actors and for the interface we have widgets. But what is with quite abstract objects. Items in the inventory for example. i want to work with the items but not have them spawned in the world if you understand what i mean. I only want to spawn them when they are visible.
And there are also things like the inventory system that are completely in the background. They are not even a actor. How do i handle this. I know there is a object from which i could extend but here i have no idea how to create an instance of it.
Maybe i totally misunderstand the system, but i would be very pleased when someone could tell me what the regular workflow with things like that.
I think using Actors for items in your character’s inventory is actually fine (just turn them invisible and turn off their collision as long as they don’t exist it the map) but if you’re worried about efficiency, you could also treat the inventory as an array of structs holding (among others) the class of the object to spawn and the amount carried.
As for the inventory itself, you could implement it as an ActorComponent that gets attached to any character capable of having an inventory.
To spawn an object derived from UObject (for global non-actor objects), you’ll need to use NewObject:
UMyGlobalObject* myGlobalObject = NewObject<UMyGlobalObject>( this, "Object Name" );
is correct but I want to add that using the terminology “data only” may be confusing in UE4 terminology. Data Only blueprints signifies a blueprint that doesn’t have any functions, events, or any script of any kind. As said, it seems like you would prefer UObjects. All Actors must be represented in 3D space which is why AActors aren’t want you’re looking for most likely.