• 0

    posted a message on Loading Screen Creepy Eyes

    Got this little present last week and have been unable to find any posts online regarding it. So here you go, world.

     

    Someone at blizzard is an a**hole, lol. Freaked me out.

     

    Posted in: General Chat
  • 0

    posted a message on [Data] Core: generic object creation error

    And I apologize for this necro as well, however I wanted to share one possible source of these CTDs and error.

     

    I experienced this error when I created an infinite while loop within a function (in Triggers).

     

    Posted in: Data
  • 0

    posted a message on Income with trigger

    In reply to aZergBaneling:

     I've setup a system (for a map I help with) that has 3 capture points, which is why I was able to help here. I use an array of size 3 for each of these points and the variable type is a record that contains a handful of dialog / dialog items and variables. I prefer to create dialogs at map start and just show/hide them instead of dynamically creating them, but I suppose it all depends on the need.
    For a lot of capture points, off the top of my head, I would say just do what I am doing and increase the array size. It would be possible to do all this for virtually any number of capture points, even if they changed locations and/or quantity on a game-by-game basis. Thank you for your picture, BTW, aZergBaneling. I was too lazy X_X
    Posted in: Triggers
  • 0

    posted a message on trying to save Wins / Losses into Bank

    In reply to onlyleviathan:

     With regards to recording games left, I've experimented with this a little. I've used a trigger with event "Player Leaves Game" with any. The trigger adds 1 to the games left variable and stores it to the player's bank. In my test runs, I tried leaving the game through standard methods and it worked. I also tried killing the SC2.exe process as well as performing a soft reboot and the bank saved correctly each time. I didn't try a hard reboot or disconnecting my internet access. Additionally, I can't remember if I performed these tests online or just offline.
    As far as autobalancing, it's definitely something that takes a lot of planning. My current autobalance method uses players' scores (a formula of their lifetime stats) and tries to even the scores out over 2 teams. First it find the scores for all players and assigns the top player to team A and the 2nd highest score player to team B. Each team has a max of 5 players, so, after much consideration, I decided to simply calculate every possible team combination and go with the combination that most closely balances things. If we account for the possibility of uneven teams, the total number of team combinations is C(8,4) + C(8,3) = 126; this is totally reasonable.
    Autobalance will probably be one of your biggest headaches through development. As @ImperialGood said, there's really no way to secure players' banks 100% of the time. Any obfuscation, encryption, or validation schemes for banks you come up with can be defeated. It takes virtually no skill to find your bank and delete it. You can see how this might affect game balance if someone who's been around for a while suddenly shows up with low or no stats and gets placed as a noob by autobalance. If you come up with any good autobalance schemes though, I'd love to hear them.

    Good luck!
    Posted in: Triggers
  • 0

    posted a message on Income with trigger

    In reply to Reason:

    Starting Cap: Here's how I would do this. Create 1 global boolean variable for each building that can be "capped". This variable will be false if no units are capping the building and true if they are. The trigger that fires when a player enters the building's region will have a condition that the boolean variable associated with this building be false.
    Capping Timer: I don't use the built-in timer functions. My recommendation is to use a real variable and call it something like "timer". Set the real variable to the time required to cap. Use a while loop with the condition that the timer be greater than 0 and, in the loop wait, then decrease the timer variable by however long you waited. That's just the timer part. Someone wrote a great guide to using waits, check it out here: "Waits in SC2 - oddities and solutions"

    Now you'll need to check to make sure that the player that started capping the building is still in the region. That's easy enough - just use the "Unit In Region" function to check that the player is still in the region. What if the player leaves the building region? Now you need some way to tell the while loop that it should stop because the building was not capped. Use another boolean variable (private). Set it to false if the player leaves the region and, in the condition for your while loop, add a condition that this boolean variable be true. So the condition will be that timer is greater than 0 and boolean variable ("continueCap" ??) be true.

    You still need to check if an enemy player has interrupted the cap. You can make use of the same boolean variable to tell the while loop to stop the timer. To check to see if an enemy player has interrupted the cap, use a private unit group variable. After you check to make sure the capping player is still in the region, set the unit group variable to units in region with alliance to player. You can make this as simple or complicated as you want, but the simplest way would be to set the unit group to look for units in the cap region with enemy alliance to the capping player with max amount 1. If the size of the unit group variable, the number of units it found, is more than 0, stop the timer because someone interrupted the cap.
    Posted in: Triggers
  • 0

    posted a message on Removing Dependency - Loading Triggers Crash

    Hullo.

     

    So I spent about 8 hours removing a custom dependency that was causing problems. While removing the dependency, SC2 editor crashes. It gets to "Loading Triggers from Void.SC2Mod" then spams that message infinitely. I have tried this twice with the same result both times. I checked the editor logs and the only thing in there is a handful of "unable to find unit parent" errors.

     

    Not sure if this is the best place to post this. If I should post this somewhere else, please let me know.

     

    Thanks

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Get player name

    screenshots

    Posted in: Triggers
  • 0

    posted a message on Dialog addon help/question.

    I'm not sure how much help I can be because I don't use the default leaderboards, but it looks like there is an option to set the leaderboard columns. I imagine you could create a trigger that adds 1 column to the leaderboard when that mode is enabled. If the mode is toggled on and off in-game, then you'd want a trigger that responds to that toggle by changing the number of columns (add 1 for enabled, remove 1 for disabled). Unless your leaderboard update function is constantly running and you can work with local variables, you'd need to create a global boolean variable that lets the leaderboard update function know if you're showing that extra column.

     

    Alternatively, you could do what many of us do and create your own leaderboard from scratch. It can take a while to do that, but you can get it exactly the way you want.

    Posted in: Triggers
  • 0

    posted a message on Diablo-style exp bar? [Solved]

    Ah, it sounds like you already know how to use dialogs then. Soooo, if you intend to do the exp bar via dialog, you'll need to do the following:

     

    1. Create the dialog. If you are going to have more than 1 player in the map, you don't need to create duplicate dialogs for each player -- just create the 1 dialog. Save as variable.
    2. Create dialog items.
      1. Dialog border [Dialog Item (Image)] for the outline of the EXP bar. It's not ideal for this purpose, but feel free to download my portrait viewer map to view all borders and get their required settings. You don't need to save this as a variable.
      2. EXP Bar [Dialog Item (Image)]. You'll probably want to create your own. I used GIMP with the free DDS plugin to create a simple square of the desired color, export it as DDS, and import into SC2. I have had varying degrees of success with exporting DDS - if I remember right, DDS 2 has most reliably worked for importing to SC2 for me. Again, you'll only need 1 of these as you can increase the bar for each individual player. Set the height to whatever you need (save height as variable) and set width to 1 (0 might work, I don't know). However, make sure you create a constant integer variable for the full size of the EXP bar, when filled. Place EXP bar at the left of the EXP bar border. Save dialog item as variable.
      3. Current EXP dialog label (if you want the numbers always showing). Save as variable.
      4. Current Level dialog label (if desired). Save as variable.
    3. Set up the trigger to increase the EXP bar. If you have a trigger that checks for level-up, this can be done in that trigger or a completely separate trigger. Trigger event will probably be "Unit Gains Experience". To "increase" the experience bar, this should do the trick:
      • Variables:
        • filledSize [constant integer] - the variable you created earlier
        • currentExp [integer] - exp of the unit/player
        • requiredExp [integer] - exp required for next level
        • expBar [dialog item] - exp bar image (actual bar that will increase)
        • expBar_width [integer] - current size of the exp bar
        • expBar_height [integer] - height of exp bar
      • Trigger Actions (to increase EXP bar):
        1. Variable - Set expBar_width = (Round(((currentExp * filledSize) / requiredExp)))
          • Raw: SetVariable(expBar_width, (RoundI((ArithmeticReal((ArithmeticReal(currentExp, *, filledSize)), /, requiredExp)))))
        2. Dialog - Set expBar size to (expBar_width, expBar_height) for (Player group((Triggering player)))
          • Raw: DialogControlSetSize(expBar, (PlayerGroupSingle(EventPlayer())), expBar_width, expBar_height)
        3. Dialog - Set (expBar) tooltip to (blah blah blah) for (Player group((Triggering player)))
        4. If you've set up a dialog label to always display current exp / required exp, change that here

    You should place the above triggers into an if/else statement that checks to see if the player leveled up. If they leveled up, do the above triggers except set the size to 1 (or 0) and whatever else. Additionally, I used the "Triggering player" function multiple times, so it's best practice to go ahead and save the triggering player as another variable so you aren't making unnecessary function calls. I've got to go, but I will check back here later tonight in case this wasn't what you needed or you need additional help. Good luck!

    Posted in: Triggers
  • 0

    posted a message on Change footprints via triggers

    So I do have an idea about this, but there are probably better ways than my idea, depending on your needs. First off, I know it's possible to specify certain areas to allow construction and disallow other areas, but I don't know how that's done. If that's all you need, then I would try to figure that out as it's probably the best solution.

     

    The next best option would be to modify the footprint to allow construction at an otherwise non-buildable area. I don't know how to do that either :P

     

    If all else fails, you could try the following. Keep in mind, however, that I haven't tested this so I don't know for sure that it would work. You could create a dummy ability for that SCV that makes the SCV move towards the ordered location but doesn't actually do anything when the SCV gets there. Sooo...basically just a duplicate move ability. Set up a "Unit Uses Ability" trigger that creates the building at "Triggering ability target point" with the "Ignore Placement" option. If you choose to do it this way, the only way I can think of getting the placement model to show would be to set up another trigger. "Unit Uses Ability", location just like in the above, except create placement model at target point. In addition to that trigger, you would need to set up yet another trigger to destroy the model with event "Unit Uses Ability" stage "Generic4 - Cancel". I'm not 100% sure on the ability stages, but I think you would use "Generic6 - Complete" for the trigger that actually places the building and "Generic3 - Execute" for the target / placement model creation trigger. Don't forget to destroy the placement model after you place the building.

     

    Posted in: Triggers
  • 0

    posted a message on Diablo-style exp bar? [Solved]

    Hey coffeeclubbr,

     

    My apologies for replying without providing an actual answer, but it sounds like your question might fit better in the UI forum. It is indeed possible to create this function using custom dialogs, and if that's your wish, I can help you set up triggers to do that. However, a diablo-style exp bar wouldn't fit all that well in with the default SC2 UI, which leads me to think you might end up wanting to do a lot of layout editing. My experience with custom layout files is limited to editing the inventory, but I bet if you search through the UI forum, you will find some relevant information for modifying the EXP bar as well as moving / resizing / removing other UI elements.

    Posted in: Triggers
  • 0

    posted a message on Problem with Inventory Container 00 Border not expanding

    Doh, my apologies, I forgot to check that the file uploaded properly. Yes, lots of people have had problems with uploading files on the new site, and I've even seen some people report problems with threads disappearing.

     

    Erm, I don't have a dropbox or anything...soooo, sorry, but here's the plaintext (see spoiler below). Just open up notepad or whatever other plain-text editor you prefer, copy paste this into it, and save as [filename].SC2Layout

     

    Remember to modify/remove the 'Style val="" ' tags, or create a font style named "InventoryLabels" using the Text(F8) editor with SC2 editor.

    <Desc>

        <Frame type="InventoryPanel" name="GameUI/UIContainer/ConsoleUIContainer/InventoryPanel" file="GameUI">

            <Frame type="InventoryContainer" name="InventoryButtons">
            
                <!-- Set position of the inventory button -->
                <Anchor side="Right" relative="$parent" pos="Mid" offset="727"/>
            
                <!-- Set position of the inventory container -->
                 <Frame type="Frame" name="ContainerSizeFrame">
                    <Anchor side="Bottom" relative="$parent/Button00" pos="Min" offset="100"/>
                </Frame>
                
            </Frame>
            
            <Frame type="InventoryContainer" name="ContainerPanel00">
            
                <!-- New Label - Offensive -->
                <Frame type="Label" name="Offensive">
                    <Text val="Offensive"/>
                    <Style val="InventoryLabels"/>
                    <Anchor side="Top" relative="$parent" pos="Min" offset="-25"/>
                    <Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
                    <RenderPriority val="555"/>
                </Frame>
                
                <!-- New Label - Defensive -->
                <Frame type="Label" name="Defensive">
                    <Text val="Defensive"/>
                    <Style val="InventoryLabels"/>
                    <Anchor side="Top" relative="$parent" pos="Min" offset="48"/>
                    <Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
                    <RenderPriority val="555"/>
                </Frame>
                
                <!-- New Label - Storage -->
                <Frame type="Label" name="Storage">
                    <Text val="Storage"/>
                    <Style val="InventoryLabels"/>
                    <Anchor side="Top" relative="$parent" pos="Min" offset="120"/>
                    <Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
                    <RenderPriority val="555"/>
                </Frame>
            
                <!-- Background Image - Set Size & Position -->
                <Frame type="Image" name="BackgroundImage">
                    <Anchor side="Top" relative="$parent" pos="Min" offset="-50"/>
                    <Anchor side="Bottom" relative="$parent" pos="Min" offset="200"/>
                    <Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
                    <Anchor side="Right" relative="$parent" pos="Min" offset="400"/>
                </Frame>
                
                <!-- Close Button - Set Position -->
                <!-- NOTE! Somehow, the close button is broken... Oh well... -->
                <Frame type="Button" name="Close">
                    <Visible val="false"/>
                </Frame>
                
                <!-- Inventory Label - Set Position -->
                <Frame type="Label" name="Name">
                    <Anchor side="Top" relative="$parent" pos="Min" offset="-45"/>
                    <Anchor side="Left" relative="$parent" pos="Mid" offset="-65"/>
                </Frame>
                
                <!-- Inventory Button (Top Left button, same as open-inventory button) - Hide -->
                <Frame type="CommandButton" name="Button">
                    <Visible val="false"/>
                </Frame>
                
                <!-- Inventory Item Slots - Set Positions & Size -->
                <!-- Offensive -->
                <Frame type="CommandButton" name="Slot00">
                    <Anchor side="Top" relative="$parent" pos="Min" offset="-3"/>
                    <Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
                </Frame>
                
                <!-- Defensive -->
                <Frame type="CommandButton" name="Slot08">
                    <Anchor side="Top" relative="$parent" pos="Min" offset="70"/>
                    <Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
                </Frame>
                
                <!-- Storage -->
                <Frame type="CommandButton" name="Slot16">
                    <Anchor side="Top" relative="$parent" pos="Min" offset="143"/>
                    <Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
                </Frame>
                
            </Frame>
            
        </Frame>
    </Desc>

     

    Posted in: UI Development
  • 1

    posted a message on Lagging trigger alternatives
    Quote from ImperialGood >>

    Is there some way to get a trigger that activates the 'kill trigger' only when a 3/4 human controlled players are active?

    Yes, you do exactly what you wrote in trigger form...

     

    Count number of active human controlled players and if that number is greater than 2 then run "kill trigger" otherwise do nothing. Counting the number of active human controlled players is as simple as counting the number of players that are human controlled and still playing by looping through all players and incrementing a counter if a player meets that condition.

    Hey, quick question on this topic. I've noticed that a lot of people perform actions on all active players without using the "Active Players" function. Is there currently any good reason to not use this? For example, in this situation, it seems to me like it would be easier to simply get the number of players in active players. Of course, if you were filtering for some other criteria, you'd want to do that filtering yourself, but I assume that the Active Players function returns a player group of only current human players.

    Posted in: Triggers
  • 1

    posted a message on Lagging trigger alternatives

    Gotcha - thanks for the tip. I'm already aware of a number of things happening on the trigger side that aren't being cleaned up properly, but I haven't found any serious issues. My suspicion has been that the lag we experience is related to a specific late-game weapon. Everytime this weapon fires, it creates like 8 missile actors. We usually start seeing serious lag issues when like 6+ of these weapons are firing at once. I hate working in the data editor, so chances are I won't ever attempt to fix that one. Luckily, 90% of games don't go that long and the lag usually isn't too bad. Honestly, I was hoping it was this trigger that causes the lag spikes (lots of units receiving non-fatal damage lots of times), but I suppose there are other weapons that hit a bunch of units much earlier in the game, without causing lag.

    Posted in: Triggers
  • 1

    posted a message on Lagging trigger alternatives

    ImperialGood already did a great job answering this question, but I thought I'd throw out that there's a moba map that checks for unit damage to track assists. I've attached a screenshot of the event trigger. I'm in the process of updating and reworking the triggers for this map (haven't gotten to this one yet), so I still need to run the profiler to figure out if the late-game lag we sometimes experience is related to this trigger. However, this map has been out for a while and we've had no consistent problems with lag.

     

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