Dgunning Commander

Dgunning Commander

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
Chocapic
Posts: 556
Joined: 16 Oct 2005, 03:35

Dgunning Commander

Post by Chocapic »

I propose to you guys who are developing ai's to add a "simple" code on the UnitDamaged function detecting if the comm is the on being damaged to get a dgun command at the damager position, having the complication of not dgunning own stuff by comparing your units/buildings positions with the attackers position.
I know this is not the type of real improvement that is needed or so, but its a detail that actually gets nice, and makes it slightly more challengefull at an early stage of the game, for a "peacefull" few coding.
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

I'll definitely be sure to add code so it will fire the D-Gun, but not anything simple. I've actually got an idea how to make it lead the target.
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

I have it in my AI.
I also should (or maybe I did, I can't remember) add a time limit so the Commander doesn't chase the offender forever.

Also, I need to add a check to make sure he doesn't wiggle to death vs. a few flashes, as he does now.
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post by IMSabbel »

hm. I guess the exploit factor of that feature would be endless if it doesnt include a check of everything that could be hit by the dgun before fireing...
(or a player could make a ai dgun everything it already build)
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

Possibly, but correcting it shouldn't be difficult. Something along the lines of:

Code: Select all


Underattack by= {UnitX} (pos x,y)
Last Pos 1: (x,y)\
Last Pos 2: (x,y)|--Determines if it's moving in a circle.
Last Pos 3: (x,y)/

If it's moving in a circle, it adjusts to fire a blast across the calculated path. If it's a straight line then it fires to hit there. If under attack by multiple I have to figure out how to take into account the spread of the D-Gun blast. That way I can conserve energy by getting two or three in one shot. I know how it's supposed to work, but not how to make it work.
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Now that you mention it, my Commander has done a lot of demolitions work on his own base.

I'm not to worried about saving energy. I've never seen my AI get so low on energy as to be unable to throw out a few D-Gun shots.
Post Reply

Return to “AI”