AI scripting question

Discuss Halo 2 modding, progress on figuring things out, mapfiles...you know the drill. Cheating discussion not allowed.
Post Reply

Have you succesfully scripted AI before?

Yes sir
0
No votes
Alas...no
1
100%
 
Total votes: 1

L0d3x




Articulatist 250

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

AI scripting question

Post by L0d3x »

Okay here's the deal.

I did a newmombasa bsp conversion, also got its ai zones, its ai encounters, weapon + vehicles palletes, characters, ai squads and ai squad types.
I tried this twice.

The first time I put in some marines, and all was well. I was testing to see if the basic ai zones worked. They dodged grenades and moved a little on their own, as I had hoped. However whenever I tried to add an ai vehicle, for example a marine ghost, my map would freeze (as in it would freeze in the menu screen). I used H2 core to rebuild my map and entity to place the ai squad where I wanted them.

Having acquired medium succes with my first attempt, I decided I would now try to script my marines. So I also added Script Positions from newmombasa.
Next I made the following script: e21_mars_pelican0_entry/p2 is one of the script positions. I am aware of the fact I am using another squads script position but I'm not sure if that matters.

Code: Select all

(script command cs_e20_warthog1Test 
  (begin 
   (cs_go_to e21_mars_pelican0_entry/p2)
  )
)
My squad is called e20_mars_warthog1, but only contains plain old marines (this squad worked on my first attempt). I linked one of the 3 spawning marines to this command script. However with this script in place, my map freezes as well. I can however pause it with yelo and fly around at the very beginning. When I unpause it it freezes. And I can see the marines.

My question to you, the audience, is: am I doing something wrong with my script? And why are my vehicles freezing?

I kindly thank you in advance.
L0d3x
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Post by grimdoomer »

Well I still have yet to test scripts like that in mp i have a very massive one. But i noticed that some SP-MP bsp conversions freeze with in a few seconds with AI. I have also ecountered this problem with the research arm bsp. Idk why but they just freeze. And your script is a little "dusty" so to speak. with just that they will run into walls even with zones try this, this might take care of the freezing problem cause your script is messed up.

Code: Select all

(script command_script e20_warthog1Test
 (begin 
  (cs_enable_pathfinding_failsafe True)
  (cs_go_to e21_mars_pelican0_entry/p2
 )
)
Note you must use

Code: Select all

command_script
just plain command might be whats making it freeze. also did you refrence the script to your squad in the AI Squads pallet???
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
Post Reply