#you know anything about getting
1 messages · Page 1 of 1 (latest)
actually you don't this bind event event stuff
you can just get item directly from the component
like you did
what bp is this in ?
i mean just doean't make sence
i want the information of my event dispacther
not that
why are you binding again ?
This can be liek 100 in the world
is this bp item ?
a sec ill explain
^ also this if it is it's completely wrong, just pull out of the return value of get component of class and call the event
it will trigger whatever you bound
the goal isn't just the event but getting the information
for one thing you don't need the event
BP_item have this inside of him
inside of what bp ?
BP_item
thats his info like name
i have child of this one where i just change the text
slow down
your making this way more complicated then it is
it's a simple process tbh
if you have a variable on a component
you can access it
i don;t care about my com XD
like this, but don't bind, you already are accessing the item reference
you have the item
item isn't a comp
now just drag out and get the variable
the bp item is this
a literal actor in scene
0 relation with the comp in my player currently
and is the reference to item in the player controller component set to that item ?
controller own the comp that should have it
now the thing is
this item i can have 100 of those
been doing for the past year
but no class
so give or take if what i learn is good XD
i can't keep repeating myself, if you set the value item on the component
then when you drag out of the return value of get component of class, thats connected to the player controller
there you have the reference to whatever item you set in your player controller on that variable
it's really simple
get player controller -> get component by class -> get variable
and there you have the reference
item is then whatever you have set in that component, in that variable
so if you had 10000 of them
if you can only have one selected at a time
when you get this variable
it will be whatever one you have set
idk why you added bind i didn't say anything about that
you don't need any events for this
Hi, I will describe how to use Reference Variables in Unreal Engine 5. Please follow my channel and subscribe for more tutorial like this. Please Check Asset here
https://game-maker-dhaka.itch.io/
Download Low Poly city: https://game-maker-dhaka.itch.io/low-poly-city
Side Scroller Game: https://game-maker-dhaka.itch.io/ue5-side-scroller-game-3...
ok so if you want to get this particular items info, i would set the reference in your component
then you can just get the reference like i'm talking about, and get all the data on that item
you can drag out from the reference, and get the item info variable np
but i can't set it
when do you want to set it ?
are you picking things up ?
or are you scrolling through them or what is happening that you need this item reference ?
i see it's labeled inventory, so you may want array of all the items you currently have
well if you want to get just that single item
you can get actor of class
as long as there is only one in the scene
well are these items spawned or placed in the level before hand
can be both
personally...
i would parent them all to a parent class
and get all actors of class
done
so you have an array of them
unfortuantely what your trying to avoid is pretty difficult
a fuck XD
been on this for 8h lol
ya sometimes get actor of class is the answer
especially if this is dynamic stuff
you have no way of getting a reference otherwise
unless you interact it
and inside the item parent i have this
when do you want the information about the sword ?
this is the event that trigger when i interrract or press the key
so then i'm hoping if it's set up right, you can drag out of interactable, cast to the parent if it's not that already, and get the variables
that is the item so i wont try to get itself
so do you know what i mean by "drag out from" and what that is ?
"so it wont try to get itself" <-- idk what this means
if you drag out from interactable, and cast to bp item (if it's not already set to that)
interacteble thst inside the item
and interactor is inside player controller
all inside BP_item
sound on the good track?
so now you have the item data for whatever you have interacted with on the player controller inside a component
so when you interact with any item, you will pass that variable onto that component