Set of objects to collect

hello. I consult them. I already have a large set of objects to collect in the level. the problem is that there are many objects and it is annoying to create in blueprint one by one. Is there a way to do it together? Thank you

It really depends on what you’re trying to do. Are you trying to add them to an array? Could you show the annoying part?

Inheritance is what you need.

You make one blueprint that you can pick up, and then all the others inherit from this, and have a different mesh, different points etc…

1 Like

ok. thank you very much for the tutorial

there are several seeds that the character has to eat and I don’t know how I can do it together, since there are more than 300 in total. and the idea that when you finish eating the whole game is over

Many ways, the most common one is to count them down with an Event Dispatcher, the Seed Actors already trigger an event when they get destroyed, we need to subscribe to that event.

You can do this in any blueprint (apart from the Seed Actor, that is):

tip: if you assign, you’ll get a custom event with the appropriate signature automagically:


when you finish eating

I’ve assumed that eating means destroying the seed.

1 Like

Exactly, when eating the seeds they disappear. I’m going to try it. Thank you

hello. create a blueprint of the seeds with collision

I made the connections but it didn’t work for me.
what am I doing wrong

First, semilas should be an actor (with one element(mesh)) you put in a level(either manually dragging actor to a level one by one, or by spawning them from the level blueprint).
Second, when your character overlaps the semilas (cast to your character from an “actor begin overlap”(in semilas blueprint)), call destroy actor function (also semilas blueprint).
Then this code will work. Also, if you are spawning them, make sure you spawn them before you get all actors of a class(original semilas class). Do not use semilas1,2,3… for now and don’t put them in a level.

2 Likes

yes, what I did at the beginning is to make a new actor that would be the seeds and that is the group of seeds in general. and in the blueprints of the character I linked it but I didn’t work on it. I’m doing something wrong

what does this semilas brick and box exploding icon represent?

1 Like

the seeds is a set of seeds, it is an actor.
the big box is collision

how was this set of seeds made ? No idea what that is.
Also, what would that one collision box do anyway? Its just one collision box.

1 Like

is a mesh of a set of imported seeds. and the box is a single collision that wraps all the seeds

that is the edit of the mesh

Doesn’t work that way. Every single seed has to be an actor with its own collision. One actor blueprint that contains 1 sphere mesh component and 1 collision sphere component (same size as sphere mesh) - and than drop this actor (as many time as you need) in a level manually or spawn them programmatically from level blueprint.

1 Like

and there are more than 300 seeds, do I have to do it one by one? :grin:

You can speed up planting manually by duplicating the actors or set of actors (hold ctrl and select some actors in a row and than press right click and select duplicate) in editor.
Or make some for loops for spawning.
Or make a custom editor.

2 Likes

ok, I’m going to see it. Thank you

hello. I did a test with a sphere with its collision and it does not destroy it. add these nodes and still the same.

captura2