referring to one instance of an actor based on a unique value in said blueprint

So I have a blueprint class which serves as a pseudo collectible, except the gimmick is that when the player hits it, the collectible follows the player around, and the idea is I want the collectibles to fall in a line with one another depending on the order I picked them up in. So, to start, I gave the blueprint class of the collectible a variable which is different with each instance depending on when I collect said instance. This has worked so far, and whenever I go over a bunch of these collectibles, each one is differently “tagged” with a number, the order in which I collected them in. The issue is that I have no idea how to call upon a specific instance of this blueprint class with a certain ‘order number’. I want to be able to say “get the instance which has an order number one less than yours” but I can’t figure out how to refer to a specific instance of a blueprint class depending on its unique tag IN said blueprint class

In short, I don’t know how to refer to a specific instance of a blueprint class by identifying it by a unique variable value I have given it

  1. [10:46 PM]

Sorry that was really hard to explain If need be, I can draw a diagram/provide blueprints

The issue is that I have no idea how to call upon a specific instance of this blueprint class with a certain ‘order number’. I want to be able to say “get the instance which has an order number one less than yours”

Why not add them to an array? Then index array equals that collectible. And +/- math works here. Would that work for you?

image

[10:46 PM]

Not sure how this fits into the system, though. On one hand you say: “an order number one less” but then we have a time of day. Is this part of the gimmick?


In short, I don’t know how to refer to a specific instance of a blueprint class by identifying it by a unique variable value I have given it

  1. [10:46 PM]

You could use a map association here:

This would result in you knowing which actor was picked up when, and could look it with a timestamp.

I feel like you may need to elaborate some more. :innocent:

haha, the timestamp was an accident from me copying this over from a discord message i sent where i didnt get any responses. i will try working with arrays, although i am fairly inexperienced. i will let you know. thank you!

I GOT IT : D
here’s more or less what worked
which blueprint i had this in was also crucial

image

1 Like