PDA

View Full Version : AI driving perfect using a command list and this script! :D



CodeBrain
June 25th, 2008, 04:16 PM
LoL I can has script that works! :D

btw: Had it for a while, didnt realize anyone would still need it >_<


(script continuous omfghax
(object_create_anew elite)
(object_create_anew wraith)
(unit elite)
(unit wraith)
(unit_enter_vehicle elite wraith "wraith-driver")
(sleep_until (= (vehicle_test_seat_list wraith "wraith-driver" elite) true) 5)
(ai_attach elite wraith-driving/pwnage)
(ai_command_list wraith-driving/pwnage haxdriver)
(sleep_until (= (and (= (unit_get_health elite) 0) (= (unit_get_health wraith) 0)) true)))

This script means:

It makes a elite biped and a wraith. The script makes them both units, and the elite biped enters the wraith. This script waits untill that seat for the wraith is filled by the elite biped, then continues. From there, it attaches it to a encounter, and gives it a command list. Then it sleeps untill both of them die, which makes it start all over again. They perfectly drive the entire command list.

Why/How this happens:

When the biped goes into the vehicle, it doesn't have it's AI yet, so it thinks its still on the ground, not in a vehicle. When the script attaches the biped to the encounter and gives it the command list, the ai believes its on the ground still, not in the vehicle.

The result? A elite in a wraith that perfectly follows the command list and attacks people.

The command list is just a figure eight around the bloodgulch bases, lol.

Choking Victim
June 25th, 2008, 04:23 PM
does it work with hogs?

CodeBrain
June 25th, 2008, 04:26 PM
I have tried using hogs, I know for a fact that spartan ai will never use it (neither will the marines) But, there is a solution.

Simply make a marine that has the elites ai, and use the script. Edit the vehicle settings to where the ghost or wraith would be.

It SHOULD work, but Ill try it out, see how it does.

EDIT: Apparently, this doesn't work with warthogs. I'll keep trying, but I dont think its possible :(

S3anyBoy
June 25th, 2008, 04:54 PM
I'm pretty sure that's just because the wraith driving isn't retarded. If I recall ghosts and wraiths can use command lists and stuff correctly it doesn't work for pelicans or hogs or anything though.

p0lar_bear
June 27th, 2008, 02:08 AM
AI is unable to drive unless the driver seat is also attached to the gunner seat.

...though I recall someone telling me once that they managed to get AI to drive without a gunner seat, but never explained themselves. :?

CodeBrain
June 27th, 2008, 10:38 AM
Ah, so thats why. Thanks p0lar, you saved me! :P

Ki11a_FTW
June 27th, 2008, 02:09 PM
I have tried using hogs, I know for a fact that spartan ai will never use it (neither will the marines) But, there is a solution.

Simply make a marine that has the elites ai, and use the script. Edit the vehicle settings to where the ghost or wraith would be.

It SHOULD work, but Ill try it out, see how it does.

EDIT: Apparently, this doesn't work with warthogs. I'll keep trying, but I dont think its possible :(

I have my ai driving warthogs perfectly :X, with my own little process

CodeBrain
June 27th, 2008, 02:22 PM
Eh, release process mb? :P

Ki11a_FTW
June 27th, 2008, 03:17 PM
maybe ill release a video later.

TeeKup
June 27th, 2008, 07:57 PM
I'll try and sex it out of him later. I remember playing a few of his mods and those hogs pissing me off cause they actually seemed good. >_>

S3anyBoy
June 27th, 2008, 09:10 PM
Lol recorded anims

adumass
June 27th, 2008, 09:31 PM
I have my ai driving warthogs perfectly :X, with adumass's little process Fixed, also I'll make a tutorial as soon as I remember what I did to make it work.

Edward Elrich
June 28th, 2008, 11:23 AM
It's simple, do what they did with the chaosgulch map, attach the driver seat to the gunner seat. It's a slightly larger target, but the AI can still drive the 'hog.

TK421
June 29th, 2008, 11:15 PM
I did something like that once a LONG time ago. It was simple, all I had to do was change the vehicle type, I think, and enable 3D firing positions.

Ah, here's the tut.
http://hce.halomaps.org/index.cfm?fid=2298

Ki11a_FTW
June 30th, 2008, 01:22 PM
Yes but adumass's process doesnt require that you have to check off the flag "AI flying", so they will not go out of control, are follow a simple instruction of where to go and what to do.