got most of the code on the left from a tutorial and I would like to reuse it to also delete the item under certain circumstances.
what’s wrong with my code?
I want it to delete the item when it is in range and E is pressed
thanks a ton!
got most of the code on the left from a tutorial and I would like to reuse it to also delete the item under certain circumstances.
what’s wrong with my code?
I want it to delete the item when it is in range and E is pressed
thanks a ton!
that’s not exactly how code works.
you’ll need to connect the branch node to the E event
and set the “kill item” variable on begin overlap and end overlap.
imho i will discourage connect things among different events and functions (like you have that widget and kill item variable).
that’s leads to spaghettification.
IMO:
You are right, but it may be too complicated for a beginner to handle.
I would just modify it on what he currently does. At least make it work first.
Avoiding complexity now could be kicking the can down the road.
I would change the code to this: Move E input to the player character. On press check for overlapping actors with interface to execute.
@CyberPanda1670 please let us now if you need help on how to do this.
Agree. E
is working as an interaction subsystem, so it should be implemented as such.
Sorry for the delayed response. As a beginner, yes, I would like an explanation on how to make this possible. Also thank you guys for taking the time to help me w/ this!
With inspiration from ideas you guys suggested, I stitched it together with a cool video on youtube I found and it works great!!
the picture above is the exact code I used incase any future onlookers want to know. Hello onlookers!
subbed!