x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Help With Weapon Auto Pick-Up System

Hello,

I'm starting a project and am trying to create all of the basic functionality of my game. One of the main aspects is a weapon system that auto-equips weapons as you walk over them, replacing the current with the new. Only one weapon to be held at a time.

The plan was once I got the weapon to despawn I would then begin working on assigning it to a socket on the character, but unfortunately I'm having trouble even getting this started. I followed this tutorial exactly (it's literally a 3-piece blueprint class, kind of impossible to mess it up), yet when I walk over the weapon nothing happens. The only thing I can think of is that this tutorial came out just 1 day after UE4 was released back in 2014, so maybe things have changed since then that are required?

https://www.youtube.com/watch?v=piqrHiypJeE

I made sure that both the static mesh (weapon) and the character skeletal mesh (in the "sidescrollercharacter" blueprint) have "Generate Overlap Events" enabled from their collision settings. What else could it be?

Product Version: UE 4.19
Tags:
more ▼

asked Jul 12 '18 at 10:02 PM in Using UE4

avatar image

Skisma
63 8 12 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Open your static mesh asset in browser, then check if you even have any collision primitives assigned.

more ▼

answered Jul 13 '18 at 02:16 AM

avatar image

andrej_
6 1

avatar image Skisma Jul 13 '18 at 02:05 PM

Thanks for the response! I just checked and there weren't any assigned. I was just following that video and he didn't mention setting that up. I added a box collision to the static mesh, deleted my blueprint and re-created from the updated mesh with collision primitive. Same result.

At this point I've verified there is a collision primitive, created a blueprint mimicking that in the video, verified "Generate Overlap Events" is enabled on the mesh, the blueprint and the character mesh within the sidescrollercharacter blueprint. Anything else I'm missing?

avatar image Skisma Jul 13 '18 at 09:02 PM

Update: I found a better solution for what I'm trying to accomplish and I almost have it working. Rather than destroy the actor it's simpler to cast to my character and attach the weapon to a socket of the character skeleton. I have this working..almost. It's attaching between the feet rather than the "Weapon" socket that I created in the palm of the right hand. Can someone tell me what I'm doing wrong?

Attached my blueprint and a before and after pic of what's happening.

alt text

pickupbp.png (155.7 kB)
capture1.png (559.7 kB)
capture2.png (549.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Solved: This was actually a simple mistake on my part. The reason it was attaching between my feet instead of to the socket I assigned in the BP is because I had two versions of the SK_Mannequin skeleton (One that came with the template and one that came with the AnimStarterPack I imported). I was referencing the wrong one, the one I hadn't created the socket for, therefore it couldn't find the socket and just placed it at the default location.

For anyone that might come across this in the future, I've simplified the blueprint, you don't need the "cast to" module from my previous screenshot.alt text

weaponpickupbp.png (103.1 kB)
more ▼

answered Jul 20 '18 at 08:18 PM

avatar image

Skisma
63 8 12 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question