Jump to content

Undroppable Ammo - Possible? - Looking into quest items and keys


Recommended Posts

Hi and thanks for your suggestion.

 

I have previously used "weaponfire" as a means for generating a "regenerating ammo" response. Like a lot of other methods, using that method has it's advantages and disadvantages.

 

For instance, I found that a player that uses Power Armor will 'break' a script using "weaponfire" unless there's a lot of additional scripting based on how Power Armor works within the game. Once the player enters Power Armor, the regenerating ammo effect will stop and won't continue again. I've been informed that there are ways to counteract this effect but I have yet to try it.

 

My current method uses a timer mechanism (OnTimer & StartTimer) that seems to work fairly well so far (except, of course, for the case of ammo that you can drop from the inventory) :)

 

Again, thanks for your suggestion.

 

Hey, sorry I didn't realize you couldn't attach scripts to ammo. For this case I would maybe attach a script to the weapon. You can make it so you only have a certain amount of ammo and check every time the weapon is fired with an animation event. Example script:

 

Ammo Property WeaponAmmo Auto

Event OnEquipped(Actor akActor) 
    RegisterForAnimationEvent(akActor, "weaponFire") 
    CheckAmmo(akActor, WeaponAmmo)
Endevent 

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    CheckAmmo(akSource, WeaponAmmo)
EndEvent 

Event OnUnequipped(Actor akActor) 
    UnRegisterForAnimationEvent(akActor, "weaponFire") 
EndEvent 

Function CheckAmmo(ObjectReference akSource, Ammo akAmmo) 
    If akSource.GetItemCount(akAmmo) < 10
        akSource.AddItem(akAmmo, 1, True) ;add 1 ammo silently 
    Endif 
EndFunction

Again have the script extend ObjectReference

Link to comment
Share on other sites

Hi and thanks for your suggestion.

 

I have thought about using something similar; Unfortunately, I don't have a lot of time at the moment to experiment with it and see how far that it can go for helping me to achieve the effect that I want. But I thank you for pointing this method out for me and clarifying the use of "OnMenuOpenCloseEvent," which I hadn't seen yet. Thank you.

 

 

You could perhaps have ammunition that only existed while the weapon was equipped. So if they have the weapon drawn, they get an ammo count. Catch OnMenuOpenCloseEvent and you can remove it when they open the inventory or talk to a shopkeeper. Combine that with your idea of monetarily worthless ammo, and you should get more or less what you want.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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