I’m trying to refill several glasses but it only works with the first one I make.
every time I hit the key and I’m near the tap it should do something but it only works with the first one
How do I get them all to work?
I’m trying to refill several glasses but it only works with the first one I make.
As in your other threads - you must stop using Get Actor of Class if you want one specific actor instance, it leads nowhere. To get a reference:
• trace what you’re looking at
• use an overlap event
• click on it, get what’s under the cursor
How is the player deciding which glass to fill?
the inthehand is not useful to decide which one?
What’s inthehand? Whatever it is, you’re not using it. You’re getting one with a Get All node, and you never know which one it is.
Or do you want refill ALL at the same time? If so, loop through the array rather than using Get0.
The in hand node is activated when I take something in my hands, I don’t want them all to be filled at once, just the one I have in my hand
Then use that reference to fill the correct actor instead of Get Actor of Class.
use the carried reference actor to complete? and for set scalar do I use a custom event?
[image]
Assuming the Carried Actor
has the cylinder, you don’t even need a custom event. But it’s generally helpful to have one and call it.
If the plan is to carry various actors and interact with them, start looking into interface communication. Otherwise you’ll never stop casting.
I’m going to try to make an interface communication
The base does not contain the cylinder, therefore what I wanted to do did not work, I still did not manage to do it, I am trying with line trace, which is what I do for the pickup
You’re still using GetAll actor; don’t, unless you want to do something to all actors.
You said you have an actorinhand -(Carried Actor) → use that. And send it an interface message. That actor will then fill its own cyllinder.
Looks fine. A couple of notes:
Self
(but it’s OK to do so, ofc)I added these nodes for the overlap to the tap
How do I add more custom events to the interaction? or should I make an interaction for each custom event? I have tried calling him from thridperson but he won’t let me
You can add as many functions to the interface as you want:
Any actor can implement any number of them in any way providing it implements the interface:
Note that sometimes one function may be enough since each actor can interpret Use
in a myriad of ways - that’s the whole point of using an interface. You send a generic message and the target actor decides what the message means.
I have tried calling him from thridperson but he won’t let me
Interface calls are always available from anywhere, you just need an actor reference - and it does not even need to be valid. Grab reference and send a message:
IT WORKS, you are incredible, thank you very much for everything
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.