Changes between Version 8 and Version 9 of Finding_Your_Way_Around


Ignore:
Timestamp:
Sep 1, 2011, 12:24:54 PM (13 years ago)
Author:
Jonathan Waller
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Finding_Your_Way_Around

    v8 v9  
    250250
    251251== Using the Console ==
    252 Press the ~ key (top left key (` for UK)) to toggle the console. This allows you to view various debug output that has been written by scripts using console.write or from C++ using Console->!InsertMessage. It also lets you enter !JavaScript expressions to be evaluated. To do this, start a like with ":" to run an expression, or "?" to run it and print the output. For example, `:new Entity("hele_infantry_spearman_b", new Vector3D(0,0,0))` will create a Hoplite at the left corner of the map, and `?1+1` will write 2. One useful variable is `selection`, the array of currently selected units. For example, type `:selection[0].actions.attack.melee.damage *= 2` to double the selected unit's attack. One useful function is `startPlacing(type)`, which will create a cursor for placing a unit of the given type. You can find most of the available functions in !ScriptGlue.cpp. You are also free to use variables, loops, etc in the console.
     252Press the ~ key (top left key for non US) to toggle the console. This allows you to view various debug output that has been written by scripts using console.write or from C++ using Console->!InsertMessage. It also lets you enter !JavaScript expressions to be evaluated. To do this, start a like with ":" to run an expression, or "?" to run it and print the output. For example, `:new Entity("hele_infantry_spearman_b", new Vector3D(0,0,0))` will create a Hoplite at the left corner of the map, and `?1+1` will write 2. One useful variable is `selection`, the array of currently selected units. For example, type `:selection[0].actions.attack.melee.damage *= 2` to double the selected unit's attack. One useful function is `startPlacing(type)`, which will create a cursor for placing a unit of the given type. You can find most of the available functions in !ScriptGlue.cpp. You are also free to use variables, loops, etc in the console.
    253253
    254254== Logging and Debugging Functions ==