Jump to content

Getting Ammo Count


felixk4

Recommended Posts

@felixk4

howdy, thanks for asking an awesome question

a little more info for your hypothetical, and what you're envisaging,

will help folks to find a way to get to what you're envisaging.

Why are you trying to override the magazine size to 0?

 

You might find looking at the Junk Jet, Any Mod Any Fail (if you can still find it)

and several weapon overhaul or standalones, very insightful for how they make a magazine 0.

a lot of cool stuff is achieved via using containers and arrays.

 

 

  Reveal hidden contents

 

 

I hope I have given some ideas in the meantime, and there was something of use there,

and I look forward to what mods you might have in mind and what you can do with

the GetLoadedAmmoCount variable.

Link to comment
Share on other sites

  On 3/13/2017 at 5:39 PM, montky said:

@felixk4

howdy, thanks for asking an awesome question

a little more info for your hypothetical, and what you're envisaging,

will help folks to find a way to get to what you're envisaging.

Why are you trying to override the magazine size to 0?

 

You might find looking at the Junk Jet, Any Mod Any Fail (if you can still find it)

and several weapon overhaul or standalones, very insightful for how they make a magazine 0.

a lot of cool stuff is achieved via using containers and arrays.

 

 

  Reveal hidden contents

 

 

I hope I have given some ideas in the meantime, and there was something of use there,

and I look forward to what mods you might have in mind and what you can do with

the GetLoadedAmmoCount variable.

 

I'm basically trying to cause a reverse reload to simulate a weapon jam through a magic effect, which would force the player to reload their weapon to clear the 'jam'.

 

 

This is the script code I have so far which does nothing.

Scriptname FelixWeaponJam:FelixWeaponJamTest extends activemagiceffect

Keyword Property MyKeyword Auto Const

Ammo Property akAmmo Auto Const

Event OnEffectStart(Actor akTarget, Actor akCaster)

akAmmo set to akCaster.GetWeaponAmmo()

If actorCurrentWeapon.HasKeyword(MyKeyword)
     akCaster.UnequipItem(akAmmo, False, True)
EndIf
EndEvent



Edited by felixk4
Link to comment
Share on other sites

@felixk4

AHA! now that makes a lot more sense...

(one of my 20 odd guesses wasn't too far from the mark hehe)

cool!

 

the present block might not work as it is an undefined conditional global akCaster.

right, so you might find "Any Mod Any Fail" and "weapons maintenance overhaul"

ammunition accurizing mod etc. projects to be very interesting in how they achieve it.

 

 

  Reveal hidden contents

 

Link to comment
Share on other sites

How I've managed to track ammo count is to basically create a virtual ammo counter, starting with the known clip size of the equipped weapon and subtracting 1 for every shot fired.

 

You have to keep track of reloading and resetting it back to whatever number it is, but I think it works pretty well.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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