OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started 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 :)
-
Not needeed ;) Goto difficulty settings and select "Super AI" on...
-
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-
-
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
-
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-
-
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
-
Thanks for that script :)
Somebody else know how to make a Super AI??
-
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";
};
-
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-
-
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...
-
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?
:)
-
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