Burst fire

Emu.Man00

New Member
Reaction score
41
How would i go about making a unit have a burst gun attack (hopefully passive)
as in 3 shots, wait, 3 shots, wait as opposed to shot, shot, shot, shot.

EDIT:
thanks for all the help, really appreciated.[/sarcasim] Follow up questions:
1. anyway to momentarily stop a unit from attacking, yet not altering it in ANY other way?
2. how does this sound [keep in mind it's a temp for units n variables]
Code:
shoot
    Events
        Unit - A unit Is attacked
    Conditions
        (Attacking unit) Equal to burst shooter 0000 <gen>
    Actions
        Set shootnum = (shootnum + 1)
        Game - Display to (All players) the text: (String(shootnum))
Code:
shootpause
    Events
        Time - Every 0.10 seconds of game time
    Conditions
        shootnum Equal to 3
    Actions
        Set shootnum = 0
        [COLOR="Red"]Unit - Set burst shooter 0000 <gen> acquisition range to 0.00[/COLOR]
        Wait 1.00 seconds
        [COLOR="Red"]Unit - Set burst shooter 0000 <gen> acquisition range to 600.00[/COLOR]
Red was the only thought i had, now i shall be screwing with it until i get it working, any help would make it faster and will b appreciated :D
 

Psiblade94122

In need of sleep
Reaction score
138
what you can do is detect if the unit shoots

first, have every unit that will implement this be numbered and put into a integer array

then detect when the unit attacks
set the integer to add one, when the integer reaches how ever times you want to burst, make a dummy unit and make it cast a 100% attack speed slow on the attacking unit, and set the counter back to 0
the slow would last as long as you want for it to fire the next burst

<this will make the unit play animation ready, so it looks like it still has a target, but it wont fire untill the buff goes away>
<note, if you are not useing the unit's custom value, then you can do that instead of makeing a variable>
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
You don't need the timer, timers use up heaps of RAM so try your best not to use them, insted you can put it all in one trigger

Code:
shoot
    Events
        Unit - A unit Is attacked
    Conditions
        (Attacking unit) Equal to burst shooter 0000 <gen>
    Actions
        Set shootnum = (shootnum + 1)
        Game - Display to (All players) the text: (String(shootnum))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
             If - Conditions
                 shootnum Equal to 3
            Then - Actions
                 Set shootnum = 0
                 Unit - Pause burst shooter 0000 <gen> 
                 Wait 1.00 seconds
                 Unit - Unpause burst shooter 0000 <gen> 
    Else - Actions
 

Emu.Man00

New Member
Reaction score
41
thanks for that. trying out slow idea now.

do i need specific slow to get -100% speed? or is it game constant? something else? i've tried on sorc's slow but off the top of my head don't know any other ones.
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
In OE in Abilities there's two things that are "Data - Attack Speed Factor" and "Data - Movement Speed Factor" put movement data to 0 unless you don't want the unit to be able to move, and set the attack speed to 1.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top