Jass documentation Database

JASS Documentation Database REFORGED


Results for the query "MeleeStartingUnitsNightElf" as a "function"

The search keyword must be a single word (no spaces).

Function MeleeStartingUnitsNightElf

Line: 8861
Location: blizzard.j
Constant? no
Type: function
Arguments: player whichPlayer, location startLoc, boolean doHeroes, boolean doCamera, boolean doPreload
Returns: nothing

Preview

Extra spaces may have been removed from the original file to show the function in a comfortable way.
  1. function MeleeStartingUnitsNightElf takes player whichPlayer, location startLoc, boolean doHeroes, boolean doCamera, boolean doPreload returns nothing
  2.     local boolean  useRandomHero = IsMapFlagSet(MAP_RANDOM_HERO)
  3.     local real     unitSpacing   = 64.00
  4.     local real     minTreeDist   = 3.50 * bj_CELLWIDTH
  5.     local real     minWispDist   = 1.75 * bj_CELLWIDTH
  6.     local unit     nearestMine
  7.     local location nearMineLoc
  8.     local location wispLoc
  9.     local location heroLoc
  10.     local real     peonX
  11.     local real     peonY
  12.     local unit     tree
  13.  
  14.     if (doPreload) then
  15.         call Preloader( "scripts\\NightElfMelee.pld" )
  16.     endif
  17.  
  18.     set nearestMine = MeleeFindNearestMine(startLoc, bj_MELEE_MINE_SEARCH_RADIUS)
  19.     if (nearestMine != null) then
  20.         // Spawn Tree of Life near the mine and have it entangle the mine.
  21.         // Project the Tree's coordinates from the gold mine, and then snap
  22.         // the X and Y values to within minTreeDist of the Gold Mine.
  23.         set nearMineLoc = MeleeGetProjectedLoc(GetUnitLoc(nearestMine), startLoc, 650, 0)
  24.         set nearMineLoc = MeleeGetLocWithinRect(nearMineLoc, GetRectFromCircleBJ(GetUnitLoc(nearestMine), minTreeDist))
  25.         set tree = CreateUnitAtLoc(whichPlayer, 'etol', nearMineLoc, bj_UNIT_FACING)
  26.         call IssueTargetOrder(tree, "entangleinstant", nearestMine)
  27.  
  28.         // Spawn Wisps at the start location.
  29.         set wispLoc = MeleeGetProjectedLoc(GetUnitLoc(nearestMine), startLoc, 320, 0)
  30.         set wispLoc = MeleeGetLocWithinRect(wispLoc, GetRectFromCircleBJ(GetUnitLoc(nearestMine), minWispDist))
  31.         set peonX = GetLocationX(wispLoc)
  32.         set peonY = GetLocationY(wispLoc)
  33.         call CreateUnit(whichPlayer, 'ewsp', peonX + 0.00 * unitSpacing, peonY + 1.00 * unitSpacing, bj_UNIT_FACING)
  34.         call CreateUnit(whichPlayer, 'ewsp', peonX + 1.00 * unitSpacing, peonY + 0.15 * unitSpacing, bj_UNIT_FACING)
  35.         call CreateUnit(whichPlayer, 'ewsp', peonX - 1.00 * unitSpacing, peonY + 0.15 * unitSpacing, bj_UNIT_FACING)
  36.         call CreateUnit(whichPlayer, 'ewsp', peonX + 0.58 * unitSpacing, peonY - 1.00 * unitSpacing, bj_UNIT_FACING)
  37.         call CreateUnit(whichPlayer, 'ewsp', peonX - 0.58 * unitSpacing, peonY - 1.00 * unitSpacing, bj_UNIT_FACING)
  38.  
  39.         // Set random hero spawn point to be off to the side of the start location.
  40.         set heroLoc = MeleeGetProjectedLoc(GetUnitLoc(nearestMine), startLoc, 384, 45)
  41.     else
  42.         // Spawn Tree of Life at the start location.
  43.         call CreateUnitAtLoc(whichPlayer, 'etol', startLoc, bj_UNIT_FACING)
  44.  
  45.         // Spawn Wisps directly south of the town hall.
  46.         set peonX = GetLocationX(startLoc)
  47.         set peonY = GetLocationY(startLoc) - 224.00
  48.         call CreateUnit(whichPlayer, 'ewsp', peonX - 2.00 * unitSpacing, peonY + 0.00 * unitSpacing, bj_UNIT_FACING)
  49.         call CreateUnit(whichPlayer, 'ewsp', peonX - 1.00 * unitSpacing, peonY + 0.00 * unitSpacing, bj_UNIT_FACING)
  50.         call CreateUnit(whichPlayer, 'ewsp', peonX + 0.00 * unitSpacing, peonY + 0.00 * unitSpacing, bj_UNIT_FACING)
  51.         call CreateUnit(whichPlayer, 'ewsp', peonX + 1.00 * unitSpacing, peonY + 0.00 * unitSpacing, bj_UNIT_FACING)
  52.         call CreateUnit(whichPlayer, 'ewsp', peonX + 2.00 * unitSpacing, peonY + 0.00 * unitSpacing, bj_UNIT_FACING)
  53.  
  54.         // Set random hero spawn point to be just south of the start location.
  55.         set heroLoc = Location(peonX, peonY - 2.00 * unitSpacing)
  56.     endif
  57.  
  58.     if (doHeroes) then
  59.         // If the "Random Hero" option is set, start the player with a random hero.
  60.         // Otherwise, give them a "free hero" token.
  61.         if useRandomHero then
  62.             call MeleeRandomHeroLoc(whichPlayer, 'Edem', 'Ekee', 'Emoo', 'Ewar', heroLoc)
  63.         else
  64.         endif
  65.     endif
  66.  
  67.     if (doCamera) then
  68.         // Center the camera on the initial Wisps.
  69.         call SetCameraPositionForPlayer(whichPlayer, peonX, peonY)
  70.         call SetCameraQuickPositionForPlayer(whichPlayer, peonX, peonY)
  71.     endif
  72. endfunction
"That guy ’s nuts! Grab ’m!" Hmmm... there's no info about this keyword... be the first one in contribute with the keyword MeleeStartingUnitsNightElf. You must be logged into the site in order to give us a hand in keeping updated the information. If you don't have an account, you can create one here.
Page loaded in 0.1094 seconds.
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...