Precise Measurent Using Map Editor

In my previous post, in order to get accurate measurements of how far an SCV travels over very small time intervals, I used some of the programming features of the map editor.  This post will not go over the basics of creating a map, but it will give most of the details of the map I created so that the experiment can be reproduced.  There are many YouTube videos that can help with learning how to use the map editor, but I found the following channel particularly useful:  GalaxyEditorTutorial.

The map we will create will allow the player to order an SCV to move between two predefined points by pressing a keyboard key.  The map will also include a timer and a list box, and will be programmed to print the relative position of the SCV into the list box every 0.0625 game seconds.  Here is an overview of the steps needed to create the map:

  1. Create two points with a distance of 4 grids between them.
  2. Create global timer and list box variables.
  3. Create an SCV positioned at the first point, angled toward the second point.
  4. Create a trigger to initialize the timer and list box.
  5. Create a trigger that will order the SCV to move to the second point and will also calculate the distance from the first point every 0.0625 game seconds (one game tick).

The first step is to setup the map with two points with a distance of 4 grids and an SCV at the first point.

Next create global variables for the dialog, list box, and timer.

All new maps start with a Melee Initialization trigger, which contain actions that are not useful for this type of map.  First delete those actions and add the following actions to initialize the global variables.

Finally, the last trigger is activated by the user pressing the 0 key.  This trigger first orders the SCV to move to the second point.  The rest of the actions consist of pairs of wait and print commands.  Each wait command forces the trigger to wait another game tick.  Each print command calculates the distance of the SCV from the first point and adds the value to the list box.

Finally this map can be run by dragging the map file onto the SC2 launcher desktop icon.  After the user presses the 0 button, the distances will be displayed in the list box.

This entry was posted in Experiment Methods and tagged , , , , . Bookmark the permalink.

3 Responses to Precise Measurent Using Map Editor

  1. pat says:

    i wonder if there is a list of league maps with the amount of time it takes for a probe to travel from one base to the other(s)
    if there isn’t i will do it and post the results here, though it might be off by a second because i don’t have these precise measurement techniques u have here
    then when u start a game, u can look up the map name in the list and decide weather early pressure is feasable

  2. pat says:

    just found it 🙂
    he used this cool map analyzer to do it, it does all kinds of ther things too! check it out:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s