• 0

    posted a message on Calculating APM

    Hi. I am trying to make a script to manually calculate the APM (Actions per Minute) of a player and store in a variable.

    It's pretty simple to find the average APM of a player. I created a variable "Actions" as an integer with default value 0. Each time a unit is selected or a command is issued to a unit, I increase this variable by 1. The APM can then be calculated as "Actions / Mission Time * 60", in other words the number of actions divided by number of seconds that passed, multiplied by 60 (since there are 60 seconds in a minute)

    In the observer / replay interface, each player has 2 types of APM - average APM and current APM.

    I want to find the "current" APM of a player, but I actually have no idea how the game calculates it. So does anyone know how to calculate the "current" APM of a player?

    Posted in: Triggers
  • 0

    posted a message on Hotkeys Change Upon Publishing

    So was there any solution in the end?

    Posted in: Data
  • 0

    posted a message on Force AI to build certain units at a certain order

    Has anyone found a working solution?

    Posted in: Triggers
  • 0

    posted a message on Force AI to build certain units at a certain order

    So I have an AI and I want it to build 3 Probes, then build a Pylon, 2 Gateways, before continuing to make 4 Probes. I want to force the AI to do this build and follow the order that I had specified. What this means is that the AI should not build anything in between the first 3 Probes and the Pylon, the Pylon and the 2 Gateways, etc.

    How do I achieve this? I've tried using the Set Stock action like this:

    AI Advanced - Set stock for player 2 to make 3 units of type Probe
    AI Advanced - Set stock for player 2 to make 1 units of type Pylon
    AI Advanced - Set stock for player 2 to make 2 units of type Gateway
    AI Advanced - Set stock for player 2 to make 4 units of type Probe
    AI Advanced - Enable restocking which has the AI try to make the objects specified by AISetStock for player 2
    

    But the AI doesn't build any probes. I've also tried using the Train and Build actions:

    AI Advanced - Train 3 units of type Probe in player 2's town 0 with priority 0
    AI Advanced - Build 1 units of type Pylon in player 2's town 0 with priority 0 using build flags -1
    AI Advanced - Build 2 units of type Gateway in player 2's town 0 with priority 0 using build flags -1
    AI Advanced - Train 4 units of type Probe in player 2's town 0 with priority 0
    

    But with this, the order is messed up.

    How do I ensure that the AI strictly follows the build including its order?

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?

    Still no working solution... anyone??

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?

    bump

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?

    Bump. Anyone has a working solution??

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?

    @FunkyUserName: Go

    I'm not really sure on how to do this... any ideas?

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?

    Bump.

    Posted in: Triggers
  • 0

    posted a message on Share vision between players excluding cloaked and burrowed units

    @FunkyUserName: Go

    Thanks for your response. How do I make it work for burrowed units as well?

    Posted in: Triggers
  • 0

    posted a message on Share vision between players excluding cloaked and burrowed units
    Player - Turn player 1 Shared Vision On towards player 2
    

    With the "Set Alliance Aspect" action, Player 2 has vision of all of Player 1's units, while Player 1 is unable to see Player 2's units.

    However, with this action, Player 2 is able to attack Player 1's cloaked / burrowed units, even when Player 2 has no detection.

    How do I make it such that Player 2 still requires detection to be able to attack Player 1's cloaked and burrowed units?

    Thanks.

    Posted in: Triggers
  • 0

    posted a message on Ignore hooked-up leader panel hotkeys?
    Dialog - Hooks up an existing Panel in the standard UI called "UIContainer/FullscreenUpperContainer/LeaderPanel"
    Variable - Set Production Tab = (Last created dialog item)
    Dialog - Show Production Tab for (Player group(1))
    

    This is my code to show the production tab (the special tab that spectators see) for Player 1.

    However, when Player 1 press S, the tab changes more to Spending. How do I set the tab such that it ignores players' hotkeys?

    Posted in: Triggers
  • 0

    posted a message on Unload ONE unit from Bunker

    How do I issue an order to unload only ONE unit from a bunker? So for example, if a Bunker has 4 Marines and I want to unload only one of the Marines (stored in a variable), how do I achieve it? Thanks.

    Posted in: Triggers
  • 0

    posted a message on Gets units that will be affected by Lurker attack?

    Bump.

    Actually, the most important thing is to get the units in a line. Im not sure how though.

    Posted in: Triggers
  • 0

    posted a message on Get target unit for "Unit Starts Attacking" event

    @FunkyUserName: Go

    Thanks so much!!!

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