Salvos for the turret behaviour

This forum is currently in read-only mode.
From the Asset Store
10 turrets rendered in 3D with top down and menu views. Three upgrade levels per tower.
  • Private variables should solve this elegantly. For example, Salvo = number of shots within one salvo.

    On (Do something to cause shooting)

    Repeat (Fire shot) Salvo times.

  • Well...I did make it easily with variables. I guess the only function it needs to work 100% like the way GMG wants though is to at least add the feature for Constant Fire, because there's no way to make the turret do that currently. Unless, again, I'm missing something.

    And Mipey... that Repeat loop would cause the turret to create five bullets all at once in the same tick.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, let's call it simultaneous salvo?

    Okay, you are correct, however. Here is alternate solution (in pseudocode) - assuming the Turret object has a Salvo PV:

    +Turret.Value('Salvo')>0
    + Every 100 ms
    

    Fire Bullet Action here

    Substract 1 from Turret.Value('Salvo')[/code:1rg7mug9]

    So whenever you want the turret to fire, you change its Salvo to, say, 4 and it would keep firing until it's fired 4 shots. As for targeting - you could just make it remember the position it fired at first, or you could make it check target each shot. Modify the 'Fire Bullet Action' stuff to define how it behaves during salvo.

  • Ok well I guess for realism's sake this: http://www.mediafire.com/?znqtwnuywnz

    Should be pretty close.

    I still say since its relatively easy to do, there's no point in changing an existing plugin.

    But I don't see why there can't be an additional plugin that does this.

    Goodness knows what the future will bring, especially if someone should ever make a easier way to make plugins.

    Perhaps something like a sub-plugin, that works in tandem with another plugin.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)