Page 1 of 1

Make AI drive a circuit.

Posted: Fri Dec 25, 2009 1:35 pm
by fo0k
how to make a bot just drive round and round and round and round.. a simple road circuit?

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 9:51 pm
by Coroner47
Could you maybe have a vehicle on a rotation bundle & have the ai spawn inside it?

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 10:54 pm
by fo0k
hmm.. can has more sexy.

want them to appear as real as possible.. also its not a circular circuit :)

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 10:56 pm
by POTAmatt
how to make a bot just drive round and round and round and round.. a simple road circuit?
Look in the IS82 AI mini mod i did for you. In the map highway, the axis team starts out at a raceway. For laughs, i wanted them to do 1 lap around the track before heading off for control points. The trick to keep them going only in one direction was to create strategic waypoints around the track whose only neighbor is the previous waypoint it had been in:

aiStrategicArea.create racewayA 204/1263 214/1273 175 land
aiStrategicArea.create racewayB 436/1194 446/1204 150 land
aiStrategicArea.create racewayC 383/1432 393/1442 125 land
aiStrategicArea.create racewayD 224/1562 234/1572 100 land
aiStrategicArea.create racewayE 90/1506 100/1516 75 land

aiStrategicArea.setActive racewayA
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addNeighbour racetrackbase
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 20.0

aiStrategicArea.setActive racewayB
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addNeighbour racewayA
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 20.0

aiStrategicArea.setActive racewayC
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addNeighbour racewayB
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 20.0

aiStrategicArea.setActive racewayD
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addNeighbour racewayC
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 20.0

aiStrategicArea.setActive racewayE
aiStrategicArea.addObjectTypeFlag Route
aiStrategicArea.addNeighbour racewayD
aiStrategicArea.addAllowedVehicleGroup land
aiStrategicArea.setSide 0
aiStrategicArea.vehicleSearchRadius 20.0

Note that racewayB is only a neighbor to racewayA, racewayC is only a neighbor to racewayB, etc. Just use these and modify racewayA so that it's only neighbor is racewayE. Piece o' cake.

P.S. Merry Christmas!

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 11:04 pm
by POTAmatt
Also (since seeing you posted 2 minutes prior to me), this is not a circular circuit. Just put the waypoints in strategic areas, and, if possible, "stripe" the pathmaps in ED42 to encourage them to stay on the track.

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 11:04 pm
by fo0k
oo.. never saw it but now remember you saying something about the guys doing a lap of the circuit!

does leaving A next to E mean they will just keep looping round?

There are no CP's on the map (This is the RCC mod.. )

would be cool to have a few drones cruisin round

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 11:18 pm
by POTAmatt
Yes, if A is connected to E, then they'll loop. All you need to keep in mind is that the bot gets assigned to a waypoint and is then told to go somewhere based on your strats. If the place he wants to go has his currently assigned waypoint as a neighbor, then he'll go for it. So if he's in RacewayB and he wants to go to C, he will only go if Raceway C has B listed as a neighbor. Also, strategic areas aren't dependant on control points. If the area happens to be a control point, then flag it as one (aiStrategicArea.addObjectTypeFlag Controlpoint), otherwise flag it as something whose value you can modulate in your strategies.con (remote, route, base, north, south, etc.).

Re: Make AI drive a circuit.

Posted: Fri Dec 25, 2009 11:45 pm
by fo0k
heh awesome.. just checked them out on the circuit. was great watching them fight but had never checked the lap!
also their 'careful speed' should work in favour with the rcc cars as their top speed is roughly a soldier running speed.

thanks man.. ill have a try at this

Re: Make AI drive a circuit.

Posted: Sat Dec 26, 2009 12:45 am
by POTAmatt
was great watching them fight but had never checked the lap!
Yeah, that's the old story with bots - the balance between fire and moveto.

The RC cars sound like a lot of laughs. They looked great in the pic. It would be even funnier with little bots driving them. I don't know, could you scale a seat animation? LOL.

Re: Make AI drive a circuit.

Posted: Sat Dec 26, 2009 2:58 am
by fo0k
heheheh well all soldiers are gone.. no seats im afraid

Im getting the first version packed up now and then the AI bit can hopefully come in a patch.. I'm going to setup a tab for the mods on this site to handle the forum for it. it has made me think this site really should contain a full list of the mods with download links..


edit: (3 years later..)

get the Radio Controlled Cars mod here- http://rccmod.com/