#you know anything about getting

1 messages · Page 1 of 1 (latest)

covert rapids
#

will be less messy for others

polar acorn
#

oh ok

#

this

#

is where you would put it

covert rapids
polar acorn
#

actually you don't this bind event event stuff

#

you can just get item directly from the component

#

like you did

polar acorn
covert rapids
#

i mean just doean't make sence

#

i want the information of my event dispacther

#

not that

polar acorn
#

why are you binding again ?

covert rapids
#

This can be liek 100 in the world

polar acorn
covert rapids
#

a sec ill explain

polar acorn
#

it will trigger whatever you bound

covert rapids
#

the goal isn't just the event but getting the information

polar acorn
#

for one thing you don't need the event

covert rapids
#

BP_item have this inside of him

polar acorn
covert rapids
#

BP_item

#

thats his info like name

#

i have child of this one where i just change the text

polar acorn
#

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

covert rapids
#

i don;t care about my com XD

polar acorn
# covert rapids

like this, but don't bind, you already are accessing the item reference

#

you have the item

covert rapids
#

item isn't a comp

polar acorn
#

now just drag out and get the variable

covert rapids
#

the bp item is this

#

a literal actor in scene

#

0 relation with the comp in my player currently

polar acorn
#

and is the reference to item in the player controller component set to that item ?

covert rapids
#

controller own the comp that should have it

#

now the thing is

#

this item i can have 100 of those

polar acorn
#

but the reference on your component stores one at a time

#

unless you have an array

covert rapids
#

yes

#

it is ok 1 at a time

polar acorn
#

are you new to blueprints ?

#

i feel like yes

covert rapids
#

been doing for the past year

#

but no class

#

so give or take if what i learn is good XD

polar acorn
#

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

polar acorn
#

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

covert rapids
#

but i can't set it

polar acorn
#

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

covert rapids
#

nonon

#

i don't have it i want it

#

to add

polar acorn
#

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

covert rapids
#

thats what i dont want lol

#

what ive been saying XD

polar acorn
#

wdym

#

your trying to avoid get actor of class ?

covert rapids
#

yes

#

just dont want to do a snece swipe each time

polar acorn
#

well are these items spawned or placed in the level before hand

covert rapids
#

can be both

polar acorn
#

personally...

#

i would parent them all to a parent class

#

and get all actors of class

covert rapids
#

done

polar acorn
#

so you have an array of them

covert rapids
#

bp_item is a parent XD

#

sowrd is a child

polar acorn
#

unfortuantely what your trying to avoid is pretty difficult

covert rapids
#

been on this for 8h lol

polar acorn
#

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

covert rapids
#

i have a interaction set up wiht them

polar acorn
#

ok so once you do that

#

you can get the reference

covert rapids
#

and inside the item parent i have this

polar acorn
covert rapids
polar acorn
covert rapids
#

that is the item so i wont try to get itself

polar acorn
#

so do you know what i mean by "drag out from" and what that is ?

polar acorn
#

if you drag out from interactable, and cast to bp item (if it's not already set to that)

covert rapids
#

interacteble thst inside the item

#

and interactor is inside player controller

#

all inside BP_item

#

sound on the good track?

polar acorn
polar acorn
#

so when you interact with any item, you will pass that variable onto that component

covert rapids
#

ya iam adding a trigget for print text to see

#

fk yea

#

work

#

i think

#

some light after all this

#

tank you