Download

Having difficulty with making a weapon bp that lets characters pick up by walking over them

I have looked through tutorials, and through other pieces of my project, but for some reason, I simply cannot think of how to fix it, and it’s giving me a literal headache…

Create a “pickup event” in the character class. This event will spawn and attach the weapon.

In your weapon class…

On Overlap → cast to character → As character → call “Pickup Event”.
Add relevant inputs to the event so it knows what to spawn.

1 Like

thank you, I knew it had to be something obvious…
guess I spent too long working on it in one sitting (tunnel vision in a way)

You can also set up your collision so that it is the only actor that will trigger the overlap. Doing this you can then use a BP Interface and not have to cast to the character class.

1 Like

oh, okay!
(tbh, completely forgot interfaces were a thing…)

also, what do you recommend for the pickup event? not necessarily just for this/weapons, but in general/for most events I add to the character class, basically…
(don’t want to inadvertently embarrass myself later)

Interfaces! reduces the need to cast (create hard references in memory).

Not knowing the full scope of your game/mode I couldn’t give you an absolute path in this regard.

But for me having interactive doors, windows, pickup items (inventory stuff) I use two interfaces. Doors/Windows/Buttons/Levers etc work with “Interactive Interface” and pickups work with “Loot Interface”.

All of which use a custom collision and response so that the custom collision is the only collision that will trigger overlaps on these items.

1 Like

also, it’s (going/supposed to be) a 3d action-adventure platformer, themed around depression and inner turmoil, where all the enemy types are representations of various symptoms/aspects of various mental and emotional disorders…

So I psychological thriller

yeah, kinda…
also, basically ‘therapy through Skyrim’

(enemy examples; a spidery creature walks out on nothing, and climbs on platforms the player can’t see or touch… that enemy is “Lies”)