[REQ] Wait_until_reloaded

Discussion in 'Mod Discussions' started by emraldis, February 18, 2015.

  1. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    It would be useful for weapon behaviours to be able to tell a unit to wait until its weapon has been fully reloaded before firing again. Could this be implemented please?
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I don't understand the problem - fire rates already ensure this occurs, or the ammo system if that's in use.
    What's the use-case/example you are trying to achieve? Do you mean the reload animation if one is specified?
    killerkiwijuice likes this.
  3. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
  4. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Basically, yeah. Would allow me to make a beam-laser that fires in bursts.
  5. dom314

    dom314 Post Master General

    Messages:
    896
    Likes Received:
    1,196
    I am going to try making this now. Brb
    EDIT: okay, seems it's not possible. All I need though is something that delay's the first shot of the weapon.

    It is however possible to make a continuous laser beam.

    You can sortof cheat a little, the unfortunate thing being that the laser beam won't update the location of it's end points over the lifetime of each 'burst'.
    Last edited: February 19, 2015
  6. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    I know how to make a continuous laser beam, it isn't too hard. I just want to make one that fires in bursts.
  7. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Use the ammo system like a pelter or holkins
  8. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Then it costs energy to fire.

    Plus it still doesn't fix the problem, the ammo system actually doesnt allow the creation of weapons that fire in volleys, I've tried with really low energy costs. (Like 1 energy in weapon storage with 0.25 energy use per fire, the weapon will use all 1, and then continue to fire ever 0.25 energy is added To the weapon storage.)
  9. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Yeah, this is why I wanted to have the "wait until reloaded" tag.
  10. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Just set "ammo_source" to "none" (I think that's the right value) to eliminate the cost while still using the ammo system.

    If you want those barrage shots, add "carpet_fire":true and "spread_fire":false
    One of these two forces the unit not to attack before the ammunition bar is full, I'm not sure which one it is.
    wondible likes this.
  11. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Ooh, thank you very much if that works then we have so many possibilities. =)
  12. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    WAT.

    DOES THIS WORK?
  13. zx0

    zx0 Well-Known Member

    Messages:
    295
    Likes Received:
    319
    Unless player gives attack order while weapon is reloading, it won't fire until it's reloaded.
  14. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    That's awesome, I can finally do a bit more in my TA: PA mod because I can do the peewees, flashes, etc... :D
  15. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Sweeeet! Gonna try that as soon as I can!
  16. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Try it and tell me if it works. xP
  17. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    For... For realzies?

    If so, they need to change what they call that in the .json, because that is so obscure, when it could be more useful if it were more descriptive.
  18. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    I guess I understand it, if it spreads fire then it'll fire each time is charges up enough to fire one alone.
  19. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    No, that much I know, that spread fire is an attempt to avoid overkill by long-life projectiles, if a weapon has spread fire then it will not fire another round at a target it just fired at, thus catapults won't fire 2 missiles at a target because 1 missile will be en route when another is fired and the 1st one will be enough to kill.

    Carpet fire does in fact come to think of it, causes bombers to empty the payload and then reload. It just didn't occur to me to try it on land unit rifles, since it is used on air unit bomb bays...
    stuart98 likes this.
  20. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Apparently from what Stuart observed carpet fire doesn't actually do that we'll enough- even in bombers.

    Have you tried it yet yourself?

Share This Page