SC2Mapster Forums

Development > Data

[Question] Weapons not showing up on unit

  • 6 posts
    #1 Nov 10, 2012 at 01:22 UTC - 0 likes

    In my mod, weapons can be equipped as items on a unit and then used. However, if I have more than 1 weapon, only one of the weapons will show up. Here is some visual aid.

    All the items in the hero inventory are weapons.
    However, only one of the 3 shows up on the unit (middle weapon in inventory). In fact, it is always that weapon (it overrides other weapons)

    How do I make the unit recognize all three of the weapons?
    And what would be the easiest way to make weapons stack (like 2 gatling guns)?
    http://i.imgur.com/MJfDq.jpg

    Also, how do I change post title to solved once the problem is solved?

    Last edited Nov 10, 2012 by Stormahawk

    My Projects:

    Empires of Smoky Skies a MOBA style Air and Naval combat game

    Ultimate Spacemen Based off of my WC3 Mod called Ultimate Footmen

    #2 Nov 10, 2012 at 02:20 UTC - 0 likes

    From prior experience, any unit with a veterancy behavior usually only shows one weapon. Aside from using some custom ui to work around it, I don't think you can change it. If you are willing to look into custom ui, however, it shouldn't be too hard to do.

    #3 Nov 10, 2012 at 05:35 UTC - 0 likes

    @Dragoneles: Go

    But why would that one specific weapon override the others on the unit display?

    I am not very familiar with the weapons or the UI. Overriding the UI to make my inventory show up the way it does was a miracle in itself.

    I also noticed something odd regarding the weapons. I gave them the 360 arc so they can fire while my ship is moving. However, when it becomes stationary, only the dominant weapon showing up on the unit continues to fire. The "dominant" weapon is a modified phoenix weapon (I got lazy and didn't want to mess with the actors). The other weapons are based off of an archons attack and the goliath's anti air attack.

    When I have other weapons equipped by themselves they do fire as they should when stationary. When there is more than one, the "dominant" weapon being displayed takes over. I think there is more than UI going on there.

    Regarding weapon stacking, I am addressing it currently in another post.

    Last edited Nov 10, 2012 by Stormahawk
    #4 Nov 10, 2012 at 06:48 UTC - 0 likes

    That is interesting...

    #5 Nov 10, 2012 at 19:18 UTC - 0 likes

    Sure none of the weapons have the Hidden flag on?

    #6 Nov 10, 2012 at 20:57 UTC - 0 likes

    @DrSuperEvil: Go

    Hidden flag is not on. How do I make all 3 weapons in my inventory show up on the unit? And why does the weapon that is showing up on the unit continue to fire when the unit is stationary but not the others? When the unit is moving, all 3 fire.

    I want to clarify, there is more than 3 weapons. The weapons can be purchased by the user for a unit to use. They can be in any order or combination. For the purpose of testing, I am using the 3 weapons displayed.

    Would editing InfoPanelHero somehow under UI fix this? I have no idea how to use the UI stuff though.

    EDIT: Changing the backswing to 0 did not fix the issue of only one weapon firing when the unit is stationary, just changed which weapon fired when stationary. However, how do I make it so the weapons are displayed. Or even better, make it so that none of the weapons are displayed on the units info panel (to avoid clutter)! Hidden flag didn't hide them.

    Last edited Nov 11, 2012 by Stormahawk
  • 6 posts

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