Announcement

Collapse
No announcement yet.

Weapon not showing up once picked up.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Weapon not showing up once picked up.

    Hello again

    I've been looking at someone's (shaun40k) blueprints for weapons.
    Rather than link it and you have to scroll for it I'm just going to copy it here.

    Ok here are my blueprints!
    So you need arrays for each assets the weapons use. Each weapon pickup as a number to correspond to its array variable. When you pick up the weapon you trigger two actions, one for the weapon and another for ammo. The ammo is separate so its easy to make ammo pickups.

    ON THE WEAPON
    [ATTACH=CONFIG]8532[/ATTACH]

    EVERYTHING ELSE ON CHARACTER
    [ATTACH=CONFIG]8533[/ATTACH]

    [ATTACH=CONFIG]8534[/ATTACH]

    Picking up a new weapon will always equip it. If you have the weapon you simply get its ammo.

    [ATTACH=CONFIG]8535[/ATTACH]

    [ATTACH=CONFIG]8536[/ATTACH]

    And finally to switch between any amount of weapons you have preset (mine is 10) with the mouse wheel. And you just have to duplicate and reverse the math to make mouse wheel down as well.

    [ATTACH=CONFIG]8537[/ATTACH]

    Hope this helps!
    So Basically I've re-created it for my weapon.
    Here are my blue prints:

    Click image for larger version

Name:	Mine1.JPG
Views:	1
Size:	42.3 KB
ID:	1137314

    Click image for larger version

Name:	Mine2.JPG
Views:	1
Size:	53.7 KB
ID:	1137315

    Click image for larger version

Name:	Mine3.JPG
Views:	1
Size:	58.6 KB
ID:	1137316

    Click image for larger version

Name:	Mine4.JPG
Views:	1
Size:	55.4 KB
ID:	1137322

    Click image for larger version

Name:	Mine5.JPG
Views:	1
Size:	80.5 KB
ID:	1137318

    Click image for larger version

Name:	Mine6.JPG
Views:	1
Size:	98.6 KB
ID:	1137319

    My Weapon variables:
    Click image for larger version

Name:	CutlassVar.JPG
Views:	1
Size:	10.0 KB
ID:	1137320

    MyCharacter variables for the weapon:
    Click image for larger version

Name:	CharVar.JPG
Views:	1
Size:	22.2 KB
ID:	1137323

    Weapon socket:
    Click image for larger version

Name:	Socket.JPG
Views:	1
Size:	34.6 KB
ID:	1137324

    Now what the problem is exactly is that when I run in to the weapon the mesh disappears from the ground but doesn't appear in the characters hand. I have tried scrolling to see if its there but it doesn't show up.

    On the Equip Weapon part I used a print string to say "Weapon Attached" so when I run in to the weapon I should get the message "Weapon Attached". This indeed does appear appear in the top left of the screen but still no weapon.

    Am I missing something obvious or doing something wrong?

    Thanks!
    Attached Files
    Last edited by AutoLiMax; 08-10-2014, 08:55 AM.

    #2
    Ahh I missed his post above that one:
    What I found to be the best way to manage weapons is setting everything on the character and just use a pawn with the weapons mesh as a trigger to set character has weapon to true. So on your Character Components put all the weapon meshes and set to hidden in game. When the Character hits the Weapon Pawn you just destroy the pawn, set has weapon to true, unhide the weapon, and use preset arrays to hold the weapons stats such as ammo, projectile type, reload, etc.
    So I need the mesh in the in the components tab of the character. do I use a static mesh or skeletal mesh? and what would I name it? How would the blueprint know that that mesh is the mesh for that specific pick up?

    Comment


      #3
      I think I need to Add my weapon to the W Model array variable which has to be a SceneComponent variable type so it can plug in to the "Set Hidden in Game" because the target is a SceneComponent.
      Click image for larger version

Name:	weapva.JPG
Views:	1
Size:	27.8 KB
ID:	1053354

      The trouble is I can't add anything to it because my weapon is a skeletal mesh component and not a scene component..
      Last edited by AutoLiMax; 08-10-2014, 09:34 PM.

      Comment


        #4
        Any one? sorry for bumping, its just driving me mad!

        Comment

        Working...
        X