Someone was asking in another thread about getting a character to follow you around and possibly simulate an ally. This is as close as I could get. The animations seem to work when they want to.
This is a simple "follow the player script" with the appearance of allies thrown in. When you get within range of the character (200 by default) he will take a defensive stance and face you. Now where ever you go, he will follow you (within the confines of the program).
;Artificial Intelligence Script
; by xplosys
;Header
desc = Simple Folow and Shoot
;A simple script to give the appearance of allies
;AI using this script can not hurt each other or the player.
;Change the plrdistwithin= distance to suite.
;Add animations for more realism (squat, strafe, etc)
;Triggers
; *** YOU MUST GET WITHIN RANGE TO PICK UP YOUR AI
:state=0,plrdistwithin=200:state=1,rotatetoplr
; *** AI FOLLOWS YOU
:state=1,plrdistfurther=200:animate=5,followplr
:state=1,plrdistwithin=150:freeze,animate=51
; *** Press Z TO ENGAGE AI
:state=1,scancodekeypressed=44:state=3,animate=5
; *** AI REPOSITION TO ENGAGE ENEMY
:state=3:rotatetoplr,rotatey=30,animate=5,runfore=100,rotatey=-30,state=4
; *** RANDOMIZE ANIMATIONS
:state=4,random=1:state=10,setframe=3
:state=4,random=1:state=11,setframe=4
;*** AI RETURNS FIRE
:state=5,ifweapon=1,plrdistwithin=300:useweapon,rundecal=6
:state=5,ifweapon=0:state=6,setframe=6
:state=5,plrdistfurther=200:state=1
; *** AI RELOAD IF EMPTY
:state=6:incframe=6
:state=6,frameatend=6:state=4,reloadweapon,sound=audiobank\guns\reload.wav
; *** PLAY ANIMATION
:state=10:incframe=3
:state=10,frameatend=3:state=5
:state=11:incframe=4
:state=11,frameatend=4:state=5
;End of Script
If you only want the character to follow you, comment out the last :state=1 line and adjust the distances with the plrdistwithin conditions.
When you encounter enemies and need help (remember that these allies cannot really help you or hurt you, they are just firing blindly with no assigned target) press Z. The character will come forward and return fire with you. If you move away from the battle, the character will stop firing and follow you again.
NOTES:
1. I don't know of any way to make the character do this automatically (without you pressing a key).
2. The first time you bring the character into battle, his run animation does not work properly. After the first time, it does. Could be my system.
3. This was tested with SciFi characters in V1.07.
Best.
I'm sorry, my answers are limited. You must ask the right question.