Differences

This shows you the differences between two versions of the page.

Link to this comparison view

stub_commands [2012/03/22 17:36]
174.3.224.234
stub_commands [2012/03/22 17:41] (current)
174.3.224.234
Line 131: Line 131:
 SetRouteUsingThreat(id, x, y, threatIndex) SetRouteUsingThreat(id, x, y, threatIndex)
  
-//Find the route length for the given squad.  -1 if cannot find a route.  showroute show it on the map.  ignoreunits 0(can't route), 1(try to avoid), 2(route as if not there) | 128 then treat all tiles as same cost+//Find the route length for the given squad.  -1 if cannot find a route.  showroute show it on the map.   
 +// ignoreunits 0(can't route), 1(try to avoid), 2(route as if not there) | 128 then treat all tiles as same cost
 GetRouteCost(id, x, y, [showRoute], [ignoreUnits]) GetRouteCost(id, x, y, [showRoute], [ignoreUnits])
  
Line 245: Line 246:
 GetUnitFacing(id) GetUnitFacing(id)
  
-//call a unit script each tick until fn returns 0.  Can only be checking one fn at any time.  Must be defined in the unit script.  Can ONLY be used to call functions with up to 6 fixed params, one used forname.+//call a unit script each tick until fn returns 0.  Can only be checking one fn at any time.  Must be defined in the unit script.  Can ONLY be used to call  
 +// functions with up to 6 fixed params, one used forname.
 SetUnitCheckFunction(id, function, [value, ...]) SetUnitCheckFunction(id, function, [value, ...])
  
Line 368: Line 370:
 HideTextMarker(id) HideTextMarker(id)
  
-//show anim at center of tile xy.  id is a user handle to allow for turning off etc-must NOT be zero. Use a negative id to loop the effect. sidemask=optional [0,1] only that side can see.  Set MinimapColourString to non-zero to show+//show anim at center of tile xy.  id is a user handle to allow for turning off etc-must NOT be zero. Use a negative id to loop the effect. sidemask=optional [0,1]  
 +// only that side can see.  Set MinimapColourString to non-zero to show
 ShowEffectMarker(id, x, y, animFile, effect, [showside], [MinimapColourString]) ShowEffectMarker(id, x, y, animFile, effect, [showside], [MinimapColourString])
  
Line 407: Line 410:
 AddVizUnitText(id, text, colour, [alwaysShow]) AddVizUnitText(id, text, colour, [alwaysShow])
  
-//on unit id, using the mask for men, play the file with the effect (-1 for none) and define the end time (1000ths of a sec, -1 for end of the anim).  animFile must be in the campaign or core ANIM dir+//on unit id, using the mask for men, play the file with the effect (-1 for none) and define the end time (1000ths of a sec, -1 for end of the anim). 
 +// animFile must be in the campaign or core ANIM dir
 AddVizUnitSpotAnim(id, mask, animFile, effect, endTime) AddVizUnitSpotAnim(id, mask, animFile, effect, endTime)
  
Line 476: Line 480:
 RenderString(x, y, font, colourString, [borderColourString], [width], [height]) RenderString(x, y, font, colourString, [borderColourString], [width], [height])
  
-//flag an area of the screen as UI.  Means the UI won't treat the mouse as pointing to the map and will not show icons or options etc.  tooltip&1 then take current string & uses as tooltip.  bits 8-15 used as an id passed through.+//flag an area of the screen as UI.  Means the UI won't treat the mouse as pointing to the map and will not show icons or options etc.  tooltip&1 then  
 +//take current string & uses as tooltip.  bits 8-15 used as an id passed through.
 BlockUIArea(x, y, width, height, [tooltip]) BlockUIArea(x, y, width, height, [tooltip])
  
Line 557: Line 562:
 ArrowUIObject(objectName, x, y, colourString, borderString, size, flare, curve, extent) ArrowUIObject(objectName, x, y, colourString, borderString, size, flare, curve, extent)
  
-//turn on tile display - this will show up tiles as per the movement when they have their tile display flag set.  Anything which causes a reset of the model, like movement or selecting a new unit, turns it off+//turn on tile display - this will show up tiles as per the movement when they have their tile display flag set.  Anything which causes a reset of the model,  
 +//like movement or selecting a new unit, turns it off
 ShowTileDisplay() ShowTileDisplay()
  
Line 680: Line 686:
 SetRouteWithCost(id, x, y, cost) SetRouteWithCost(id, x, y, cost)
  
-// Call bonus function.  The function is called from a bonus script.  Returns function return value.  If the function is not in the mission, returns -999.  If the fn does not take a param it will be ignored+// Call bonus function.  The function is called from a bonus script.  Returns function return value.  If the function is not in the mission, returns -999.   
 +// If the fn does not take a param it will be ignored
 CallBonusFunction(functionName, side, x, y, unit) CallBonusFunction(functionName, side, x, y, unit)
  
Line 698: Line 705:
 ShowCustomUI(state) ShowCustomUI(state)
  
-//returns the ID of a given pairing of set/tile.  -1 means the tile doesn't exist.  These are the internal folder/tile names, not the displayed localised names.  NOTE: this will not be a constant as game data and custom data changes, so don't rely on it.+//returns the ID of a given pairing of set/tile.  -1 means the tile doesn't exist.  These are the internal folder/tile names, not the displayed localised names.   
 +//NOTE: this will not be a constant as game data and custom data changes, so don't rely on it.
 GetTileID(set, name) GetTileID(set, name)
  
Line 719: Line 727:
 GetTileObject(x, y, index) GetTileObject(x, y, index)
  
-//return the id of the Nth object on the map of the described type.  If objectSet is an empty string then any object matching the objectName will be returned.  Returns -1 if no more are found.  Not case sensitive+//return the id of the Nth object on the map of the described type.  If objectSet is an empty string then any object matching the objectName will be returned.   
 +//Returns -1 if no more are found.  Not case sensitive
 GetObjectFromName(objectSet, objectName, index) GetObjectFromName(objectSet, objectName, index)
  
Line 773: Line 782:
 CheckScriptGlobal(scriptName, globalName) CheckScriptGlobal(scriptName, globalName)
  
-//return the value of a global from a known script.  The script name must be the filename of the script, path is not required.  If either the script or global cannot be found, zero is returned. Does not autocreate if missing.+//return the value of a global from a known script.  The script name must be the filename of the script, path is not required.  If either the script or global  
 +//cannot be found, zero is returned. Does not autocreate if missing.
 GetScriptGlobal(scriptName, globalName) GetScriptGlobal(scriptName, globalName)
  
-//set the value of a global from a known script.  The script name is filename of the script, path is not required.  If the script or global not found, zero is returned, otherwise 1.  The return value can be ignored as desired.  Does not autocreate if missing.+//set the value of a global from a known script.  The script name is filename of the script, path is not required.  If the script or global not found, zero is  
 +//returned, otherwise 1.  The return value can be ignored as desired.  Does not autocreate if missing.
 SetScriptGlobal(scriptName, globalName, value) SetScriptGlobal(scriptName, globalName, value)
  
stub_commands.txt · Last modified: 2012/03/22 17:41 by 174.3.224.234
 
Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki