AI Driving Perfect only by using a command list and script!

Discuss HaloCE modding with the HEK tools here. For help, go to the Help Desk forum above.
Post Reply
BrainEater




Wordewatician 100

Posts: 219
Joined: Tue Nov 22, 2005 6:48 pm
Contact:

AI Driving Perfect only by using a command list and script!

Post by BrainEater »

LoL I can has script that works! :D

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

Code: Select all

(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.
L0d3x




Articulatist 250

Posts: 454
Joined: Sat Aug 18, 2007 3:32 am

Post by L0d3x »

Cool I'll definitely experiment with this.
I'll try it on a warthog :P
BrainEater




Wordewatician 100

Posts: 219
Joined: Tue Nov 22, 2005 6:48 pm
Contact:

Post by BrainEater »

Damn, just figured out, this doesnt seem to work with a warthog >_<

Sorry
L0d3x




Articulatist 250

Posts: 454
Joined: Sat Aug 18, 2007 3:32 am

Post by L0d3x »

BrainEater wrote:Damn, just figured out, this doesnt seem to work with a warthog >_<

Sorry
Maybe not with the default hog, I'll do some experimenting and post any progress.
L0d3x




Articulatist 250

Posts: 454
Joined: Sat Aug 18, 2007 3:32 am

Post by L0d3x »

Ugh I've tried messing with the hog's tags a bit, I did get it to move, but not in any decent way...

Basically I just made it behave like the ghost :roll:
A hideous sight indeed...
Frak





Posts: 21
Joined: Sun Jul 13, 2008 12:14 pm

Post by Frak »

Check the flag AI Flying in the vehicle tag for the warthog. Then it will be able to drive.
L0d3x




Articulatist 250

Posts: 454
Joined: Sat Aug 18, 2007 3:32 am

Post by L0d3x »

Yes, but not in a controlled fashion. You can't tell it to go to point A, wait a few seconds, then go to point B etc.
User avatar
Cryticfarm





Posts: 3611
Joined: Sat Dec 09, 2006 7:23 pm
Location: canada
Contact:

Post by Cryticfarm »

Some where in the tutorial resource there is one where you edi tags to make them drive good.
Post Reply