Jump to content

how to get "Clip Rounds" of ammo reference dropped in the gameworld


lasere200

Recommended Posts

As the title says, I need to get the "Clip rounds" value of an ammo reference dropped on the ground. Basically ammo in the gameworld is either dropped by the player or existing as a reference of the base ammo objects. The problem is that if I use Activate to pick it up I only get a single bullet regardless of how many bullets there are. The Ammo dialog has a clip rounds field and this description:

 

Clip rounds: The number of rounds of ammo the object contains when placed in the world. Using the "Count" value on a placed reference of the ammo overrides this number and uses the count instead.

 

This is the value I need

 

If there's some other way to use a script to activate the reference as to pick up all the bullets, I'd be interested in that too.

Link to comment
Share on other sites

Thank you for the answer. Unfortunately I don't see anything that can help me. Maybe I'm just bad.

 

I am trying to get the ammo count from a single ammo reference, dropped in the gameworld. GetClipSize requires a weapon to work, as far as I can tell and as such I "suppose" is of no use to me.

 

If you drop ammo in the gameworld when hovering over it you see the count in the ui. There's a single reference though and I want to get that same count through scripting.

 

Edit:

 

https://ibb.co/S6myX09

 

All ammo base objects have "Clip Rounds" (check the image). That's what I am trying to get from an ammo ref in the gameworld, not in a container. Or just use scripting to activate the ref as to receive all the Rounds not just one as it happens with ammoRef.Activate Player 0/1

Edited by lasere200
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...