• 0

    posted a message on wtf is a 'nested iteration'?
    Quote from ST4RKiLL3R: Go

    Also, how would I create a trigger to check how many resources a player (specifically a computer, for testing purposes) currently has with a chat message? I want to make sure my other trigger is working for ALL players before I go further.

    I didn't see this answered, so here you go: right click -> new action -> find Text Message. Click the green 'message' info, then function radio button, then go to the Conversion label category list, then choose Convert Integer to Text. Click the green '0' info, then function radio button, then go to the Player label category list, and choose Player Property. The rest shold be self explanatory I hope.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need variable help (Boolean updating)

    Here's some tips:

    • An event is triggered the moment the event given occurs.
    • The comparison you place inside the condition area are the conditions that have to be met in order to run the actions below it.
    • the world "variable" is as the name implies, it is a container label that has data which varies on what you set it to.
    • As your edit notes, there are two different scopes for variables. variables created within an event will only be retained during the instance of that event. If that same trigger is ran multiple times, the variable contained within it would have multiple entities of itself with different values.

    With how you wanted to call your boolean ("Unit Group is Dead"), I assume you want to check if all units are dead. This isn't really an area you need to use a variable. Here's how you can perhaps achieve what you're after:

    Inside your Unit is Killed Event noted above, remove the condition x = true. Add a new condition as follows: Value 1: Change from Owner of Unit to Number of Units in Unit Group A new red area will appear below Value, called Unit Group. Double click that and set it to the unit group you created before. Double click Value 2: Change this to 0. Now press OK to exit out.

    Now this is a condition that checks how many units are alive in your unit group, and once it equals 0 (they're all dead), it will run the actions.

    Good luck. :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on How do you prevent a player from spamming a dialog button multiple times before it is disabled?

    I wouldn't rely on disabling the button as a means to stop a player from pressing it, instead I would do as redconfusion notes and create a "flag" to disable the action once triggered if you don't want it repeatable.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Destorying old dialog and replacing with new one

    Hide the first one, show the new one. Here's a snippet of my dialog management, with some instructions on what you should do. It may be a little advanced, sorry for that, and it's also just a incomplete copy paste, but hopefully it's enough to give you a general idea on how to manage it.

    Track your dialogs inside variables along with all the buttons.

    When map initializes, create your dialog items and set them into variables, (one for the dialog itself, and another (ideally an array) for your buttons.

    Example:
            Variable - Set x = -150
            --- Make Dialog then put it in "Hero" dialog variable
            Dialog - Create a Modal dialog of size (500, 700) at (0, 0) relative to Center of screen
            Variable - Set Hero Dialog = (Last created dialog)
            Dialog - Create a Button for dialog Hero Dialog
            Dialog - Move (Last created dialog item) to (0, x) relative to Center of dialog for (All players)
            Dialog - Set (Last created dialog item) size to (325, 50) for (All players)
            Dialog - Set (Last created dialog item) text to "Odin (Tank)" for (All players)
            Dialog - Set (Last created dialog item) tooltip to "Normal -  +0% HP" for (All players)
            Variable - Set x = (x + 50)
            Variable - Set HeroType[0] = Hero - Odin
            --- put Btn in "Hero" Btn array variable
            Variable - Set HeroBtn[0] = (Last created dialog item)
            Dialog - Create a Button for dialog Hero Dialog
            Dialog - Move (Last created dialog item) to (0, x) relative to Center of dialog for (All players)
            Dialog - Set (Last created dialog item) size to (325, 50) for (All players)
            Dialog - Set (Last created dialog item) text to "Nova (Ranged)" for (All players)
            Dialog - Set (Last created dialog item) tooltip to "Easy -  -15% HP" for (All players)
            Variable - Set x = (x + 50)
            Variable - Set HeroType[1] = Hero - Nova
            Variable - Set HeroBtn[1] = (Last created dialog item)

    Then, Use this event:
                            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked

    To  track back what was pressed and what to do with it. Use these actions:
                            Dialog - Show <DialogVar> for (Player group((Triggering player)))
                            Dialog - Hide <DialogVar> for (Player group((Triggering player)))

    Example of button management (with an event triggered with the dialog item is used):

            General - For each integer x from 0 to 9 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Used dialog item) == HeroBtn[x]
                        Then
                            ------- Create hero if it's unique, otherwise error user to pick another.
                            General - For each integer y from 1 to 13 with increment 1, do (Actions)
                                Actions
                                     ------- Find out if hero is picked
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Unit type of xHero[y]) == HeroType[x]
                                        Then
                                            Variable - Set HeroExists = true
                                        Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    HeroExists == true
                                Then
                                    UI - Display ((Name of player y) + " already picked this hero, choose a...") for (Player group((Triggering player))) to Subtitle area
                                Else
                                    UI - Display ((Name of player (Triggering player)) + (" chose " + (Text of (Used dialog item) for (Triggering player)))) for (All players) to Subtitle area
                                    ------ Hide Dialog for player
                                    Dialog - Hide Hero Dialog for (Player group((Triggering player)))
                                    Unit - Create 1 HeroType[x] for player (Triggering player) at (Random point in HeroEntry) facing 180.0 degrees (No Options)
                                    Variable - Set xHero[(Triggering player)] = (Last created unit)
                                    Camera - Pan the camera for player (Triggering player) to (Position of (Last created unit)) over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Do Not use smart panning
                                    Unit Selection - Add (Last created unit) to control group 1 for player (Triggering player)
                                    Unit Selection - Select (Last created unit) for player (Triggering player)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Upgrade level in tooltip

    Look at buttons currently in game, such as Mind Splatter (Tosh) and you'll see their markup language like so: Deals <d ref="Effect,MindSplatterInitialDamage,Amount"/> damage to the target biological unit. When the unit dies, it explodes and deals <d ref="Effect,MindSplatterExplosionDamage,Amount"/> damage to nearby enemy units.

    Find the value you want to dynamically display via (File -> View -> View Raw Data)

    Hope that helps.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Sharing Of XP

    Inside the Veterancy behavior you'll find Share Filters to share experience. I'm not sure how dependable it is, but that's what you're looking for.

    As far as manually adding experience, you can use this sort of system:

    • Create an effect called "Give Experience" with Effect Type set to Modify Unit.
    • Take note of your ID (It's left of where the suggest button is), I'm going to assume it's GiveExperience.
    • xHero[] is a Unit array I use to identify a hero, each element is the player number.
    • YourPlayerGroup is a Player Group specifying all the players with a hero.
    • Change "1" to the value you want to give in experience. (Convert -> Integer to String)

    Pick each player in YourPlayerGroup and do (Actions)

    Catalog - Set value of Effects "GiveExperience" "XP" for player Picked Player to "1"

    Environment - Execute Add Experience on xHero[Picked Player] from player Picked Player

    Posted in: Miscellaneous Development
  • 0

    posted a message on Raynor Defense

    Posting this to let others know, and hear any feedback if people are interested in giving input.

    Posted in: Project Workplace
  • 0

    posted a message on Blizzard's take on SC 2 Hero Revival

    I'll take a peek.

    There's a behavior they use to trigger the incap behavior, that's the Velarion02a - Hero Death Preventation behavior. Pop this on your custom hero. There's a few things you'll need a copy of to get it, e.g. Effects: Apply Incap Behavior, Apply Incap Stand Up Timer, Incap Heal, behaviors Incapicated, incapicated (stand up), then the actor HeroIncap..

    Then you got to duplicate some triggers/vars to track the status of the behavior on a unit:

    Go to == MAIN == global variables section and duplicate the e.g. tHEONERAYNOR with a name of your new unit. then go to == Main == initialization -> Init03Units and duplicate the sections regarding raynor to also include your new hero. (Setvariable statements and maybe unit creation if you need it)

    Be sure you're adding your new custom made heroes to the trigger conditions under === GLOBAL === -> Incapacitation -> HeroIncapicated. This is used to track the group of heroes who can be incapicated. also same folder above but RecoverIncappedHeroes to restore their state Then add them to the group p1_USER on prepare UI section, etc etc.

    There may be more sections, but just at a glance that's my recommendation to get the "incapicated" feature to work. And yeah, the behavior applied when they're HeroIncapicated is what causes them to be invul/freeze to be "recovered".

    I'm not sure if this answers your question or not, but looking over the behavior it's basically a "freeze the unit and make him ultra invulnerable" status. I don't see what stops it from being applied to anyone, but as long as the unit is being tracked to be properly applied to, it should work I would think!

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.