Jump to content


Photo

Engineers go home !


1 reply to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 26 January 2005 - 10:18 PM

I removed engineers behavior to hover near strat points in anticipation to build LP as

1.) I often see them moving away for a different job
2.) They have the tendancy to zig zag across big maps because of this

Please check if you find it usefull.


function EngineerTactic:GoToNextPost()

	-- find a strat flag that can be captured
	for strat_ai in resource_manager:GetStrategicPointAIs() do

  --we're the owner, but no post
  if strat_ai:IsLocked() and not strat_ai:HasListeningPost() and not strat_ai:IsTagged() and not strat_ai:IsStrategicObjective() then
 	 
 	 --find first flag
 	 self.tagged_flag = strat_ai
 	 break
 	 
  end
  
	end
	
	--NOT move close to the next one in anticipation
	--if self.tagged_flag ~= nil then
	--	aitrace("moving to next strategic point")
	--	self.squad_ai:DoMove( self.tagged_flag:GetEntity():GetPosition() )
  
  --don't let another engineer go to this flag
	--	self.tagged_flag:TagFlagForEngineer( true )
	--else
	
  --go to nearest base if nowhere to go to
  local base = cpu_manager:FindClosestBase( self.squad_ai:GetPosition() )
  if base ~= nil then
  
 	 self.squad_ai:DoMove( base:GetPosition() )
 	 
  end
  
	--end

end


#2 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 27 January 2005 - 01:03 AM

Larkin! Fabulous! Have to give this a shot!

Btw, any solution to allowing for idle engineers to go around and repair damaged buildings. Hate seeing a building at half health just sit there. The conditions would be similar to when a builder is called to build something. If the building gets destroyed before the engineer arrives it resets itself and waits for the next job OR until the building is rebuilt/LP captured.

I passed this along with Corsix but he's of the mind its more an API issue deep within the code. Arghhh.. More reason to get on Relic even though they continue to ensure it will be looked at. :cool:
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users