Announcement

Collapse
No announcement yet.

Ammo Pick up

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

    Ammo Pick up

    Hello again peoples.

    I'm trying to figure out how to add ammo to the character when the character collides with the mesh.
    So what Is this in my character blueprint:
    Click image for larger version

Name:	PistolAmmoPawn.JPG
Views:	1
Size:	38.5 KB
ID:	1137525
    It pretty much says that the maximum ammo for the weapon is 10 and the minimum is 0.
    The weapon can only shoot if it has more than 0 ammo which is set with the branch condition.
    Each shot costs 1.

    I've made another blueprint called "AmmoPickUp".
    What I want is when the character collides with the mesh, the ammo count in the Character blueprint increases by 2.
    The trouble is I don't know how to add 2 to the pistol ammo in the Character blueprint from the AmmoPickUp blueprint.
    This is my attempt which by the way I know is completely wrong in every way.... At least I tried.
    Click image for larger version

Name:	PistolAmmoPickup.JPG
Views:	1
Size:	37.6 KB
ID:	1137528

    Could anyone help me out?

    #2
    You would need to both get and set the pistol ammo variable like so,



    Best of luck

    Comment


      #3
      Thanks dude!
      This is how I did it from the Ammo blueprint:
      Click image for larger version

Name:	PistolAmmo.JPG
Views:	1
Size:	56.9 KB
ID:	1053605

      Comment

      Working...
      X