• 0

    posted a message on Need help moving resource panel in UI editor

    Hello,

     

    1) Check if the panel is locked.

     

    2) Do not copy the "ResourcePanel" XML, that implies to hook and update the panel.

     

    3) We need to use the native resource panel, the system will update it by itself.

     

    4) Create a new panel. See 3rd attached picture.

     

    5) Add a frame. Gift for you :

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <Desc>
        <!-- We look for the native UI frame -->
        <Constant name="FrameAnchor" val="$ancestor[@name=FullscreenUpperContainer]/$parent/ConsolePanel/CommandStub"/>
    
        <!-- This frame is used to define sizes and its location -->
        <Frame type="Frame" name="ModResourcePanel">
            <Anchor side="Top" relative="#FrameAnchor" pos="Min" offset="-64"/>
            <Anchor side="Left" relative="#FrameAnchor" pos="Min" offset="0"/>
            <Anchor side="Right" relative="#FrameAnchor" pos="Max" offset="0"/>
    
            <!-- The "ResourcePanel" has 2 rows (with same data), we must set the height to hide the duplicated row -->
            <Height val="42"/>
    
            <!-- The template we want -->
            <Frame type="Frame" name="ModResourcePanelTemplate" template="ResourcePanel/ResourcePanelTemplate">
                <!-- Same size as the parent -->
                <Anchor side="Top" relative="$parent" pos="Min" offset="0"/>
                <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
                <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
                <Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
            </Frame>
        </Frame>
    </Desc>
    

     

    6) Create your panel in the trigger editor. See 1st attached picture.

     

    7) And voilà ! You should get your resource panel above the command card. See 2nd attached picture.

    Take note that the width of your resource panel is the exact same size as the width of the command card from the left 1st button to the right 5th button. You obviously can change the XML to make it to your taste.

     

    Tip : CTRL + ALT + 12 opens the UI debugger in the game. It will helps you to find the "TriggerContainer" which is the frame container of all UI elements created with triggers. That container is itself inside the "FullscreenUpperContainer" which is everything the above the console panel, itself inside the UIContainer and the GameUI (main frame you must not forget).

     


     

    I basically gave you the solution. I usually don't but give hints, hypothesis, approximations.

    Take the time to understand what I did and why it works.

     

    Documentations :

    https://sc2mapster.fandom.com/wiki/UI_Editor

    https://sc2mapster.github.io/ui/2018/02/07/basic-introduction-to-layouts.html

     

    Have a nice day.

    Posted in: UI Development
  • 0

    posted a message on Why viper triggers "unit die" event ?

    Hello,

     

    I think this happens because of how the ability is built.

    I suppose it does something like :

    - This ability create a placeholder (or commonly called "dummy") unit, usually a precursor (see flags of Effect of type "Create Unit"), to hook the initial target unit and position.

    - Then it does the intended effect.

    - Finally, it removes the dummy unit by killing it. A unit dies and so the trigger detects the event.

     

    To check in TRIGGERS if the triggering unit is a precursor :

    - (Data Editor) Create a Validator "Unit State" and set the field "State" to "Precursor". Set the field "Enabled" to "Enabled".

    - (Trigger Editor) (See attached picture) Create a trigger with a condition : "Validator Execute" (in category "Environment"). You won't find the validator (because Blizzard didn't fix this function, pretty recent in the SC2 timeline) and you have to "Convert String to Game Link" and to write the validator ID.

     

    If this doesn't work, check what dies from this ability and exclude it in your conditions. EXCEPT the dying unit CANNOT BE the targeted unit of the ability else it would be a non-sense. That'd mean : Dead-end.

     

    Have a nice day.

    Posted in: Triggers
  • 0

    posted a message on How to make a bomb?

    Hello,

     

    Duplication, I replied here : https://www.sc2mapster.com/forums/development/data/267717-how-to-make-a-bomb

     

    Have a nice day.

    Posted in: Data
  • 0

    posted a message on Weapon Range issue.

    Hello,

     

    I assume you use a Behavior of type "Veterancy" to level up your hero.

    - Select your behavior.

    - Look for the veterancy level array where all info lie.

    - Then, for each row you add 1 Range, change to "Weapon" tab and set to 0 for "Weapon Minimum Range" modification.

     

    That should resolve your case.

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on How to share cooldown on two abilities between two units?

    Hello,

     

    We know that we can link two ability cooldowns with the field "Set ID" on an Ability object. But that only works if these two abilities are enabled on the same unit. Fortunately, that's not all !

     

    Let's take an example :

    - 2 units of type A

    - 1 unit of type B

    - Units A possess Abil1 and Abil2.

    - Unit B possesses Abil1 only.

     

    If you select them 3, units A highlighted, and execute Abil1 : Abil1 is in cooldown for both units A but not unit B.

    If you select them 3, unit B highlighted, and execute Abil1 : Abil1 is in cooldown for unit B only.

    If you select them 3, units A highlighted, and execute Abil2 : Abil2 is in cooldown for both units A.

    At this point, everything behaves as expected, and as a standard SC2 game.

     


    How to link cooldowns of Abil1 and Abil2 :

     

    1) Set an ID. Look for the field "Set ID" and set the same for both abilities. This results in sharing the cooldown (Yes, it is weird, that seems to be a legacy mechanic from Warcraft 3).

     

    2) Look for the field "Cost +" for your Ability object (Ex : Abil2).

     

    3) Change the ability link for "Charge" and / or "Recharge". (Ex : Abil/Abil2 becomes Abil/Abil1).

     

    4) Change the location from "Ability" to "Unit". This is an important change ! Changing only the link is not enough :

    > Location is "Ability" : This results in 2 abilities sharing the same link, this means both abilities shares the same parameters of charge and / or recharge but it doesn't mean the same cooldown.

    In our example : You can click twice on Abil1 to : Consume 1 charge of Abil1, click again even if it's on recharge to look for a link shared with Abil1 (which is the case for Abil2) and consume 1 charge of Abil2.

     

    > Location is "Unit" : Same thing than "Ability" location but it will consume 1 charge of the expected link for all abilities sharing it.

    In our example : That causes the recharge on both abilities.

    5) Make sure the ability has flag "Best Unit" unchecked !

    > Best Unit is "checked" : Consume the ability for 1 unit (the best unit) in the selected unit group.

     

    > Best Unit is "unchecked" : Consume the ability for all units in the selected unit group.


    At this point :

    - Your 2 units A can employ Abil1 separately or execute it simultaneously, depending on your selected unit group (= you pick each or both of them).

    - Your 2 units A can employ Abil2 but Abil1 is also in cooldown. And vice versa.

     

    Now, let's try to link Abil2 to Abil1 (which is done) through 2 unit types.

    If you followed the explanation, you may have guessed how to do that. Let's change the location !

     

    6) Location can take 5 values : Ability, Unit, Behavior, Player and Global. Set the location to "Player".

    > Location is "Behavior" : Same behavior (haha) as "Ability" but for behaviors. Obviously, it doesn't work for ability objects. And "Ability" doesn't work for behavior objects.

    > Location is "Player" : This spreads the query to everything (not only units) sharing the link for the casting player. And this whether your unit selection !

    > Location is "Global" : This is not recommended as it does the same as "Player" but for all players.


    At this point :

    - Any unit using Abil1 or Abil2 will set the cooldown on Abil1 and Abil2 for all other units.

    - This happens for abilities with the same ID.

     

    And you're done. Hope this text is clear !

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on How can I increase the unit cost according to the number of units on the field

    Hello,

     

    This a "Data Editor" question.

     

    In a normal game, you can train units. And in the editor, you know you can do that with an ability of type "Train". This ability can have up to 30 fields.

    Ok. Now, imagine you set the same unit for 10 fields.

    I give you the idea : Show / Hide the command button with help of "Prerequisite".

     

    A) Create the ability "Train". Then insert data info. Use tech. costs (Ex : 5 / 10 / 15 / 30 / 50 minerals) and remove costs for the unit in "Unit" tab (else it will add costs) ! We will come back here later. Hint : Use raw data to copy / paste fields.

     

    B) Create 10 dummy buttons to know which command is which. Duplicate the one you want and use numerical suffix, for instance.

     

    C) Create 10 "Prerequisite" with "Show +" value as follow :

    > 1st prerequisite : CountUnit(Marine,QueuedOrBetter) <= 0

    > 2nd to 9th prerequisite : CountUnit(Marine,QueuedOrBetter) == # (with # is respectively 1 to 8)

    > 10th prerequisite : CountUnit(Marine,QueuedOrBetter) >= 9

     

    D) Modify A) and set buttons and prerequisites to respective rows.

     

    E) Add the ability to your building (or unit) which will train the unit.

     

    F) Add all buttons to the command card of the building (or unit) which will train the unit. You may stack all buttons (1 to 10) of the ability.

     

    G) (OPTIONAL) Don't forget to add an ability "Queue" (Ex : Queue (5) ) to the building, allowing the player to cancel the training. Of course, you need to add the button to the command card.

     

    Aaaaaaaaaaand you're done.

     

    Have a nice day !

    Posted in: Triggers
  • 0

    posted a message on How to create 1 worker at each mineral patch and make it harvest?

    Hello,

     

    Pick each unit of type "mineral field" on the map, then create a worker on the location of this "mineral field".

    Then use action "Order Workers to Gather Nearby Resources" (in category "Unit"), works up to 6 cells.

     

    For multiplayer usage, you must do that per region dedicated to a player.

     

    Have a nice day !

    Posted in: Triggers
  • 0

    posted a message on Trouble with Hero Healthbars?

    Hello,

     

    Look for your "Unit" Actor and look for the field "Status Text Info".

    You should be able to change some things.

     

    Look for other fields related to "status" (use search bar on top) like colors, groups etc.

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on Unloading Units At A Distance

    Hello,

     

    Maybe the ability's flags can resolve that.

    Did you try to set the flag "Best unit" ?

     

    Examples when you use an ability :

    - which cast the ability for all units of the unit type in the selected unit group : Stalker -> Blink

    - which cast the ability for one unit of the unit type in the selected unit group : Raven -> Seeker Missile

     

     

    Have a nice day.

    Posted in: Data
  • 0

    posted a message on How to make a bomb?

    Hello.

     

    You need 3 behaviors.

     

    [1] : A Behavior with stacks (max 5 here) which will help to know how many damage to deal.

    [2] : A Behavior added to the Unit when born or created (= you can give this behavior immediately in Data Editor) which applies [1] every second (thank to a "Apply Behavior" Effect).

    [3] : A Behavior with the flag "Activated on death" which will create a "Search" Effect.


    "Search" Effect : Make it so that a small area around the unit will create a "Set" Effect.

    "Set" Effect : This effect will create 5 "Damage" Effect. You can add here validators to check the "Unit Type" of the target.

    "Damage" Effect : This effect must have a validator to check how many stacks of behavior [1] the Caster or Source unit currently have. Make it so that each "Damage" Effect do as you described.

     

    And you're done.

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on Effects help

    Hello,

     

    In the window opened for "Events" of an Actor, the color means :

    - Grey : Common to all dependencies.

    - Blue : From a specific dependency.

    - Green : You added events at the end, after all events already set, whether the dependency.

    - Red : You modified events previously set by a dependency.

     

    You don't have to worry about that.

    If I misinterpreted your issue, please detail it here ;)

     

    Have a nice day !

    Posted in: Data
  • 0.958367346938775

    posted a message on is "missed" sub name possible to use?

     

    I tried "subname" things and used "Weapon.*.missed", but it doesn't work. I even tried "missed", "Missed", and whatever comes in my mind.

    so I gave up on "Missed" subname and then add behavior and trigger that works similar.

     

     I also tried this and that. Nothing worked.

     

     

    but I found out that even if you have -100% damage reduced, it will dealt minimum damage to target. D:

    There might be a residual value. Maybe in "Damage" effect, or in the Damage Response of your behavior (there's a "minimum damage", default 0, should not interfere). I'm convinced you can make a nullifier easily with the damage multiplier at 0.

     

     

    I guess I have to rebuild every ranged attacks, to deal no damage when you attack the high ground...

    And that only because you want the "Miss" text. That hurts.

     

    Good luck ! I'm pretty sure that when you will get one working, it will be faster. I already had to do workarounds with weapons, make turrets working properly and launch missiles with offset from precursors. A PAINFUL TRIP for large comfort after. So, worth it !

     

    Have a nice day !

    Posted in: Data
  • 0.958357634433687

    posted a message on is "missed" sub name possible to use?

    Hello,

    <On Terms="Weapon.PhaseDisruptor.Missed" Target="At Caster" Send="Create MissedText"/>

    Which field did you fill in to get this term ?

     

    To me, the actor event "Weapon.*.Missed" does not exist. That may explain why your "Text" Actor never creates.

    I can't seem to catch the actor event for any weapon. Even using the term "SubName", it doesn't work.

     

    I tried multiple things and I only found that Effet of type "Launch Missile" has a sub-name "Missed". There might be a workaround with that but that means to build the weapon in a certain way.

     

    If I find anything else in the next days, I'll edit the message.

     

    Have a nice day.

    Posted in: Data
  • 0

    posted a message on Prime Hunter 2.0

    Hello,

     

    In 2016, we published the game mode "PRIME HUNTER", a Shoot Them All game type, and 6 years later we are back with the version 2.0 !

    Here is the topic created for the first publishing : https://www.sc2mapster.com/forums/resources/project-workplace/182192-prime-hunter

     

    Link to the project CurseForge : https://www.curseforge.com/sc2/maps/prime-hunter

    Link to the project SC2Mapster : https://www.sc2mapster.com/projects/prime-hunter

    Link to the feedback thread : https://www.sc2mapster.com/forums/player-zone/map-feedback/269781-prime-hunter

    Link to the review thread : https://www.sc2mapster.com/forums/player-zone/map-review/269782-prime-hunter

     

    We worked during 3 years to elaborate, optimize, create and test at this precise moment 3 whole levels, 2 spaceships, a complete Arsenal, some new options and more !

     

    PRIME HUNTER

     

    Authors :

    - Phosphatidylinositol

    - Ecko

    Category : Other

    Genre : Shoot Them Up

    Players : 1 or 2 players

     

     

     

    WHAT'S NEW ?

     

    > New ship : Vulture

    Unlocked on level 3 completion in Classic game mode.

     

    With its own armaments and upgrades, the Vulture can control up to 4 Auto-Drones. These will highly boost your strength but you can order their Last Maintenance (Special Weapon) to sacrifice one of them. That special weapon destroys all missiles and does great damages to enemy units. As a complementary ability, the Vulture protects itself from enemy projectiles.

     

    > New levels : 2 and 3 !

    Face dangerous Zergs and ferocious Protoss in 2 new environments and 2 new play styles !

     

     

     

     

    > Play with the mouse !

    Beware of the new Keyboard key to activate/deactivate the mouse usage.

    Of course, you can change keys for the mouse too.

    Important Note : Unfortunately, constrained by the SC2 Editor, you can only map the 2 left side buttons of your mouse.

     

     

    > New upgrades in the Arsenal for the Griffin and the Vulture !

    Discover and pay lots to enhance your power.

     

    > New section in Arsenal : Codex

    You can now discover enemy units, bosses, parallaxes and items information.

    Visit and observe what they look like !

     

     

    CONTACT

    Feel free to say "hello" or to send a feedback here or on Facebook  :

    https://www.facebook.com/sc2primehunter/

     

    Thank you for playing and we are eager to read your feedbacks and your comments !

    Posted in: Project Workplace
  • To post a comment, please or register a new account.