[need help] switching weapons ability

Discussion in 'StarCraft 2 Maps, Replays, Modding' started by DanRoss, Apr 21, 2011.

[need help] switching weapons ability

  1. DanRoss

    DanRoss New Member

    Joined:
    Apr 21, 2011
    Messages:
    2
    Likes received:
    0
    Trophy points:
    0
    hi there, im making a map that has a unit in it that i want to be able to switch weapons. and i want this to be a ability that can be toggled.
    kinda like the Terran Viking with its flying and ground modes. but obviously just with the weapons lol

    note: the unit i want to be able to switch weapons is actually the viking. the plan is to have it be able to switch between Gatling guns and Missile launchers. (or something similar)

    i have no idea how to do this if anyone could help me out that would be awesome!
     
  2. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    There's a few steps to this.

    First, you need to have the two weapons in the data editor that you want to switch between.
    Second, you need to have the button and ability in the data editor that you want your unit to use to switch.
    Third, I find it easiest to make the ability do a behavior that modifies nothing and then trigger the weapon switch, so you will need a blank behavior for the ability to link to in the data editor.
    Fourth, you need the triggers that will switch the weapon for the unit.

    I think there is a way to do it without triggers, which means more fancy data editor work. Which way would you prefer to do it? Do you know how any of these things work?
     
  3. DanRoss

    DanRoss New Member

    Joined:
    Apr 21, 2011
    Messages:
    2
    Likes received:
    0
    Trophy points:
    0
    thanks alot for the response. i have no idea how to use triggers so the data editor would be best for me. i dont know much about the data editor either haha.
     
  4. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Well, do you know how to make new weapons/abilities?