Page 1 of 1
Bots!!!
Posted: Tue Feb 04, 2003 12:19 am
by Sputnik
Hey, Jv_map: I followed the tut. on creating your own AI, and it works great!! Now I Just need to figure out how to make them say stuff. I also was thinking-would it be possible to add SH AI to AA maps??
Also: Is there a way to make a friendly AI run to a certain pathnode, once a trigger is set off??
Posted: Tue Feb 04, 2003 2:44 am
by mohaa_rox
You can't add SH AI to AA, as MoHRad crashes with SH. To make AI run to a certain pathnode, try this:
your trigger, with setthread "AI"
your script:
AI: //this will be called out when triggered
$ainame runto $pathname
If all fails, try:
$ainame thread global/runto.scr::pathname
haven't tried that, but give it a go. Thought I saw this in some script though.
Posted: Tue Feb 04, 2003 2:47 am
by Innkeeper
I must be one of the lucky ones. Spearhead does not crash mohradiant for me and I can add anything from Spearhead including AI.

Posted: Tue Feb 04, 2003 2:48 am
by mohaa_rox
That's so good. I envy you. EA promised to release the LDK for SH, but there's no sign of it.

Posted: Tue Feb 04, 2003 7:23 am
by jv_map
mohaa_rox wrote:You can't add SH AI to AA, as MoHRad crashes with SH. To make AI run to a certain pathnode, try this:
your trigger, with setthread "AI"
your script:
AI: //this will be called out when triggered
$ainame runto $pathname
If all fails, try:
$ainame thread global/runto.scr::pathname
haven't tried that, but give it a go. Thought I saw this in some script though.
Both will work (and do the same

), but there's one thing you need to bear in mind. If you just use this plain code, the AI will still try to attack enemies. That causes erratic movements, since the AI is both seeking for cover and running to your pathnode. You can avoid this by either disallowing the AI to attack enemies (type $ainame.enableEnemy = 0) or by eliminating their cover search routines ($ainame.leash = 0).
An easier way is to use AIs with their types set to 'runner'. If you also add key 'waittrigger' value 1, they will wait for a trigger event. You can just target your trigger to the AI.
Posted: Tue Feb 04, 2003 9:31 pm
by Sputnik
Well, I tried this:
I set up a trigger_multiple with
setthread runto_elevator
and the thread says
runto_elevator:
level.friendly1 runto elevator_node.
The only problem is, that when I walk through the trigger the AI suddenly spawns (it doesn't spawn at the beginning of the map) and runs to the node. Any ideas??
Posted: Wed Feb 05, 2003 11:07 am
by mohaa_rox
Try to set this, easier to understand:
level.ai_runner = level.friendly1
level.ai_runner runto $elevator_node
Posted: Wed Feb 05, 2003 9:44 pm
by Sputnik
Isn't that the same as my script??
Anyway, now most of the time he gets into the elevator successfully.
Posted: Wed Feb 05, 2003 11:49 pm
by TheShiznaeSpe
any spear user can use ai with mohrad
just rename mainta to something without main in it
change it back to mainta to play spearhead