Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: oktokels on December 06, 2018, 04:37:06 PM

Title: Geoforce M25 AI
Post by: oktokels on December 06, 2018, 04:37:06 PM
Somebody could help me with this AI that im setting...the character does not use powers, only melee. Any help would be appreciated !!

Quote['dc geo-force',
   ["target enemy",
       'blaster',
       'villain',
   ],
   ["timer", 'auto',
      'TUseRemedy()',
      'TFleeMelee(type="any",subtype="emitting_damage",time=3)',
      'TFleeMelee(situation="hurt",time=0.88)',
      "TActiveDefense('force field',mindist=50,maxdist=150,type='enemy',subtype='melee or ranged_crushing or ranged_piercing',time=1.76)",
                "TArea('earthquake',pct=50,time=2.04,type='enemy',situation=['not nearally 300','not flying'])",
                "TRanged('lava blast',type='enemy',subtype='weakness_fire')",
                "TRangedExplosive('rock throw',type='enemy')",
                'TTK()',
                'TEarthWall()',
                'TEarthSpike()',
                "TArea('increase gravity',type='enemy',subtype='fasterthan')",
                'TLand()',
                "TMelee('gravity punch',type='enemy',subtype='fasterthan',situation='not flying')",
      "TMelee('melee',pct=15,type='enemy',subtype='lowerhealthpct 25',situation='lowerenergy 40']",
      'TMoveTo(mindist=\"short\",maxdist="wholemap",subtype="not emitting_damage",time=0.88)',
   ],
   ['subtype',
           'hunter',
      'blaster',
      'normal_human',
      'flesh',
      'earth',
      'hero',
   ],
   ['energy reserve',
           'low',
   ],
]
Title: Re: Geoforce M25 AI
Post by: BentonGrey on December 06, 2018, 06:45:35 PM
Howdy Oktokels.  Just a quick glance, and I'm not an AI expert, but I THINK the problem may be that everything between the Active Defense and the Melee attack is indented.  If you put all of that in line, I THINK it would work okay...maybe? 
Title: Re: Geoforce M25 AI
Post by: oktokels on December 07, 2018, 12:38:20 AM
Hello and thx for the quick response. I think the problem you see is because of the forum text format... in the AI file everything is in line. Anyway i manage to make the powers work, i was missing a quotation mark...but still, he doesnt do what i want all the time, its been very hard to set this character up. For example, he goes straight to the TTK tactic, bypassing the TRanged and TRangedexplosive that are above the TTK, and ranged explosive tactic have no energy cost.

Hope you understand everything, my english is very limited hahah  :wacko:
Title: Re: Geoforce M25 AI
Post by: BentonGrey on December 07, 2018, 05:36:27 AM
Oktokels, I'm glad you figured that out!  Sorry I wasn't more help! 

Your English is good, and I think I understand you fine.  :)  Hmm...that's strange.  I see that the TTK is definitely lower.  Does he use them at all?  I wonder if its because you're missing the time information for the power.  Once again, this is just a guess.
Title: Re: Geoforce M25 AI
Post by: oktokels on December 12, 2018, 06:45:36 PM
I found the problem  :thumbup:

In this line
Quote"TMelee('melee',pct=15,type='enemy',subtype='lowerhealthpct 25',situation='lowerenergy 40']",

i finished the line with the wrong parenthesys !!  :doh: :doh: :doh:

Thx Anyway !! :thumbup:
Title: Re: Geoforce M25 AI
Post by: BentonGrey on December 12, 2018, 11:28:38 PM
Ahh!  Of course!  Haha, this is why I have so much trouble with modding.  I'm not detail oriented enough!  I'm glad you figured it out, man!