OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Maximus-Sniper on 27 Jul 2004, 23:57:00

Title: Super AI ?
Post by: Maximus-Sniper on 27 Jul 2004, 23:57:00
Hei again.

Someone now how to make a Super AI, only with cpp file or script?
I realy like to see how good they are :)
Title: Re:Super AI ?
Post by: Peter_Bullet on 28 Jul 2004, 00:39:03
Not needeed ;) Goto difficulty settings and select "Super AI" on...
Title: Re:Super AI ?
Post by: Maximus-Sniper on 28 Jul 2004, 00:51:59
I know that Epeli :)
But i like to have a cpp file for it or a script, so i can make a Super AI, just for fun and test :)

-Bearny-
Title: Re:Super AI ?
Post by: h- on 28 Jul 2004, 15:26:58
The Super AI is actually only an AI with full skill, so put a following line in the init eventHandler:
this setSkill 1

or in a soldiers init field:
this setSkill 1

or in a script:
unitname setSkill 1
Title: Re:Super AI ?
Post by: Maximus-Sniper on 29 Jul 2004, 17:11:33
Hei HateR_Kint

Do you meen something like this:

class skill: EventHandlers
      {
      init= this setSkill 1
      };
or is that wrong??? :)
Thank for heelping me

-Bearny-
Title: Re:Super AI ?
Post by: Nulear_Man on 30 Jul 2004, 01:18:33
heres a Script i Downloaded
It Makes ai do a Lot of stuff its a 52kb File (The Script)
 youll need WINRAR to Get it
Title: Re:Super AI ?
Post by: Maximus-Sniper on 02 Aug 2004, 12:47:37
Thanks for that script :)

Somebody else know how to make a Super AI??
Title: Re:Super AI ?
Post by: h- on 02 Aug 2004, 15:16:20
Quote
Do you meen something like this:

class skill: EventHandlers
      {
      init= this setSkill 1
      };
or is that wrong???
Close :P

I mean in the units eventHandler (like when you made the scripts work in the other thread ;) )...

class eventHandlers
{
init="this setSkill 1";
};
Title: Re:Super AI ?
Post by: Maximus-Sniper on 02 Aug 2004, 15:45:46
Thanks alot HateR_Kint
But how good is the AI now?? Whit that Setskill 1??
I try that on my Sniper, and i put some enemy 1000m away, and my sniper user 3 - 5 bullet or more sometimes, and in a lucky shoot with one bullet on target 1000m, but how do i make him to hit the target only with one bullet, You know "one shoot, one kill" :)
it's the something i have to do with my config.cpp file or???

-Bearny-
Title: Re:Super AI ?
Post by: h- on 03 Aug 2004, 19:29:03
Well, with setSkill1 the unit has maximum skill...

So you probably won't be able to make one shot-one kill unless you start to medle with the CfgAmmo settings...
I think hitProbability (or wth it was called...)  and such should affect the AI firing accuracy...
Title: Re:Super AI ?
Post by: Maximus-Sniper on 03 Aug 2004, 19:34:52
Hei
That's what i'am doing now, medle with the cfgAmmo, here is a copy:

hit=30;
indirectHit=0;
indirectHitRange=0;
explosive=0;
//maxSpeed=5000;
minRange=5;
minRangeProbab=1.0;
midRange=1000;
midRangeProbab=1.0;
maxRange=1800;
maxRangeProbab=1.0;
visibleFire=32;
audibleFire=32;
tracerColor[]={0.800000,0.90000,0.100000,0.600000};
tracerColorR[]={0.800000,0.90000,0.100000,0.600000};
visibleFireTime=4;
soundFly[]={"objects\bulletnoise",0.251189,0.900000};

what do you think???
Should i put some more in there?
:)
Title: Re:Super AI ?
Post by: h- on 05 Aug 2004, 19:51:38
Well, I'm no expert on those, so can't say much... ::)
Other than the indirectHit and indirectHitRange should be more than 0 (afaik) because otherwise you would need a completely perfect hit everytime to kill a guy... (or ??)

Also, visibleFire and audibleFire should be much lower because with those your sniper is instantly spotted and maimed... (again, afaik... :P )

But as I said, I'm no expert on this particular thing so I may may be waaayyy off... :P