Jump to content


Photo

Pathing Distance


  • Please log in to reply
1 reply to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 15 May 2006 - 09:04 PM

You removed the / 3 modifier but forgot to adjust some values.

1. CpuManager:FindClosestPostToBase(iMaxRange, bBackBuild)

Call :

			elseif (sPlacement == "BaseBack") then
			
				-- Try to build at closest post behind the base
				build_pos = cpu_manager:FindClosestPostToBase(40, true)

as well as within this function :

			if (enemy_cnt > 0) then
				dist_sum = dist_sum / enemy_cnt
				dist_sum = dist_sum + math.random( 0, 30 )
				table.insert( dist_tbl, {dist_sum, enemy_cnt, strat_pos} )
			end

2. CpuManager:FindClosestEnemyPlayer( attack )

			   --add random distance if we want to choose target for attack
			   --this will randomize a bit if two targets are nearby
			   if attack ~= nil and attack == true then 
				  new_distance = new_distance + math.random( 0, 10 )
			   end

Edited by LarkinVB, 15 May 2006 - 09:05 PM.


#2 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 16 May 2006 - 01:06 PM

Sh*t! And I really thought that I changed them all. :mellow:

Thanks Larkin! I'll change that ASAP!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users