SC2Mapster Forums

Development > Data

Disable AutoFire & Make AutoFire Ability

  • 13 posts
    #1 Feb 28, 2012 at 20:13 UTC - 0 likes

    Hi, please help!!

    My tasks:

    1. Disable AutoAttacking by units, retaining the possibility of A - attack directly at the target.

    2. Give them ability "AutoAttack" which consumes energy and unit attacks enemy forces.

    I broke my teeth on this editor )) I did abilities but it does work bad. Marine shoots without a pause, and energy is not wasted.

    Thanks alot for any help!!!!

    #2 Feb 28, 2012 at 22:37 UTC - 0 likes

    1) The Benign flag of the Buff behaviour like the ghost hold fire.

    2) in short an energy drainign reverse of the ghost ability. Use a second Buff applied by a Behavior ability that drains energy and is near identical to the ghost one except instead of adding the beign flag it disables the other buff.

    #3 Feb 29, 2012 at 22:01 UTC - 0 likes

    @DrSuperEvil: Go

    Hi.

    I first make two Behaviors:

    1st - "hold fire" way, as you suggest.

    2d - "cancel hold fire". In line modification-Behaviors Disabled i put the previous "hold fire" behavior.

    Next i make Ability for Marine, wich start 2d behavior.

    At a time when i turn on this ability enemy marines start attacking, but my not!

    #4 Mar 01, 2012 at 01:04 UTC - 0 likes

    Do the marine units have the 1st behaviour by default? Does the 2nd behaviour nor apply the benign flag?

    Last edited Mar 01, 2012 by DrSuperEvil
    #5 Mar 01, 2012 at 20:23 UTC - 0 likes

    @DrSuperEvil: Go

    Thx for reply!!! ))

    Marine units have 1st behavior by default.

    2nd behavior not apply the benign flag. This behavior does not contain fields, which can be set benign flag. At least I have not found.

    Also i tried to do through the effect disable behavior, but result is the same.....

    I thought all of this is a simple task - i was too presumptuous ))

    #6 Mar 01, 2012 at 20:57 UTC - 0 likes

    and what about add cost to weapon?
    data editor, weapon tab -> select desired weapon -> cost -> 10 energy (for example)
    now that weapon consume energy wth every use

    want it to be more spell-like? ok, just add actors, missile, splash damage, etc (if you want you can make a weapon which first effect is the persistent from psi storm)

    you don't want to use basic weapon, but a dfferent one? make an ability that apply a behaviour. when that behaviour is ON the basic weapon will disabled and the secundary one (spell weapon) will activate

    Last edited Mar 01, 2012 by arubaru304
    #7 Mar 01, 2012 at 22:27 UTC - 0 likes

    Sounds like you are using the wrong second behaviour for no2. Also it is the passive flag not the benign, my mistake.

    #8 Mar 02, 2012 at 20:27 UTC - 0 likes
    Quote from DrSuperEvil: Go

    Sounds like you are using the wrong second behaviour for no2. Also it is the passive flag not the benign, my mistake.

    Yes, i redid and now worked okay. THANKS!!!

    But i found new method: it is possible to change scanning filters for choosing weapon. Simple uncheck the four markers. But in this case i get another weapon, rather than to change the behavior of the unit.

    Quote from arubaru304: Go

    you don't want to use basic weapon, but a dfferent one? make an ability that apply a behaviour. when that behaviour is ON the basic weapon will disabled and the secundary one (spell weapon) will activate

    For more understanding what i need, I'll try to explain.

    I need two modes of behavior units.

    1. Normal mode - units not attacking by default. Player can attack and move his units, but only manually.

    2. Autofire mode - unit in hold position, but can attack automatically. In this mode value of some params(damage,distance,etc.) may vary.

    At the moment I got to do with two behaviours - 1st cancel attacking, 2nd - disable 1st. But i don't understand how to make modify weapon parameters. And really want to do to be seen the damage radius like a tank in siege mode. ))

    Thanks for your support!! You are helping me a lot!!

    #9 Mar 02, 2012 at 21:17 UTC - 0 likes

    okok, my bad. i misunderstand it, thinking that you wanted to "autofire an ability" xD

    anyway i think that what i explained before can still work:
    1. duplicate desire weapon
    2. config your normal weapon to don't attack automatically (just remove scan filters)
    3. keeping scan filter ON, add energy cost to duplicated weapon (will consume energy with every attack, but not over time)
    4. use one behaviour as requirement as explained before (when it's activated normal weapon is ON and dup is OFF, and vice versa)
    5. make an ability that activate/deactivate that bihaviour
    6. of course, add both weapons and the ability to your unit

    if you want it to cost energy overtime instead of every attack then remove "cost" from dup weapon and use a "power user" behaviour

    Last edited Mar 02, 2012 by arubaru304
    #10 Mar 03, 2012 at 11:42 UTC - 1 like

    hi again!
    yesterday i finished my map so i needed something fresh for a change, so i tried it.

    as said i duplicated marine weapon and removed scan filter to one of them, while adding energy cost to the other.
    next i created an ability (focused warrior) that apply a behaviour (focused marine), and that behaviour disabled normal weapon to finally add the automatic one.

    i created another ability with same steps for marauder,with some differences: dup weapon have no energy cost, but behaviour itself consume energy (add negative energy regen)

    Name Size MD5
    autoattack_weapon.SC2Map 211.9 KiB bafd87f88e0d...
    #11 Mar 06, 2012 at 19:21 UTC - 0 likes
    Quote from arubaru304: Go

    hi again! yesterday i finished my map so i needed something fresh for a change, so i tried it.

    Hi!! Your map is good. Thanks for your time.

    I have done differently but result the same. I used two behaviors - 1 - disable attack, 2 - disable first behavior with a little buff on weapon (+1 damage and radius). Now, because of your help, I understand both methods, but my method has the disadvantage. When turn out the auto attacks, Marine continues to attack the target, which he chose to attack. Your method hasn't this problem, but I don'bt like the inclusion of the second weapon, instead of what can be changed simply buff first . ))

    Hooray!! My goal is close! left to be done an alternative resource.

    Need to make a general resource of energy, which would be spent in the time when the unit involves auto attacks. This resource should be visible in the upper right corner instead of the minerals.

    Thanks!!!!! You are really help me!

    #12 Mar 06, 2012 at 21:07 UTC - 0 likes

    under the Races data type you can show which of the 4 ingame resources are shown. For more you need triggers.

    You can add weapons using buffs. For a simple weapon swap have identical looking weapons that has one buff disable the other for a clean switch.

    Last edited Mar 06, 2012 by DrSuperEvil
    #13 Mar 07, 2012 at 22:19 UTC - 0 likes

    I need to click manually for each attack in normal mode. How to disable the pursuit? ))

    In AutoAttacking mode it is simply highlighting the flag Can't move. It is good for this mode, but not for HoldFire mode.

  • 13 posts

You must login to post a comment. Don't have an account? Register to get one!