Author Topic: Regenerate A Specific Custom Ammo Type When Weapon is Idle  (Read 211 times)

0 Members and 1 Guest are viewing this topic.

Balistine

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • Doom Newbie
    • View Profile
Regenerate A Specific Custom Ammo Type When Weapon is Idle
« on: February 01, 2021, 03:35:46 PM »
Hi, I am completely new to modding Doom 3 and scripting in general. I need a way to recharge a custom ammo type when the weapon is in its idle state. How can I go about doing that?
« Last Edit: February 01, 2021, 06:47:55 PM by Balistine »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,028
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Regenerate A Specific Custom Ammo Type When Weapon is Idle
« Reply #1 on: February 04, 2021, 07:34:27 AM »
Easiest way would be to spawn ammo pickups at your location every X seconds while in idle function in the script.  Then the player would pickup the ammo as long as you need more.
EDIT: check out the weapon grenade script in my mod here: https://www.moddb.com/mods/the-happy-friars-last-stand/downloads/the-happy-friars-last-stand-v12-beta-2
when you explode the grenade in your hand it spawns a med kit at your location.  You'd want something similar, but spawns ammo vs med kits.
« Last Edit: February 04, 2021, 07:38:50 AM by The Happy Friar »