Yes It is Indeed Possible...Respawning and the Use of Bremmers AI Script is possible...Infact, I working on a mission @ the moment tht does spawn enemy groups, and when it does, the AI Script is activated on the Squad..
Not sure how you can get KeyCats Script to work though - I think it may be possible, but I haven't looked into it as of yet...
Do you already know how to create an Enemy Squad? Below is a Snippet from one of my Scripts. This script will spawn 4 enemy soldiers in a group and are res soldiers from the VITAPC Pack V1.4.
The added event handlers you can see, executes a further script which adds weapon dispersion when the AI fires the Weapon (h8 JAM Dispersion
)
And the killed event handler executes a furtherscript, which will execute when the unit dies. (All it does is remove the deadunits EventHandlers - It used to also remove dead units, but I like to see battlefield littered with the Bodies of the Fallen ;D )
For example:-
?!(Local Server):goto "exit"
;You can take these out before making an SQS out of this. Below is to spawn the Group. I will also tell you the Anatomy of the below.
;"Classname" createunit [getpos position,nameofgroup,"units init Field",Skill,"Rank"]
"VIT_REBEL8" createunit [getpos ds1, drpatgrp1, "drpc1=this; this AddEventHandler [{fired},{_this Exec {disperse.sqs}}]; this addeventhandler [ {killed} , {_this exec {curelag.sqs}} ]", 1, "LIEUTENANT"]
"VIT_REBEL9" createunit [getpos ds1, drpatgrp1, "drpc2=this; this AddEventHandler [{fired},{_this Exec {disperse.sqs}}]; this addeventhandler [ {killed} , {_this exec {curelag.sqs}} ]", 1, "SERGEANT"]
"VIT_REBEL21" createunit [getpos ds1, drpatgrp1,"drpc3=this; this AddEventHandler [{fired},{_this Exec {disperse.sqs}}]; this addeventhandler [ {killed} , {_this exec {curelag.sqs}} ]", 1, "SERGEANT"]
"VIT_REBEL5" createunit [getpos ds1, drpatgrp1, "drpc4=this; this AddEventHandler [{fired},{_this Exec {disperse.sqs}}]; this addeventhandler [ {killed} , {_this exec {curelag.sqs}} ]", 1, "CORPORAL"]
;This is the AI Activation.
[drpatgrp1,[],[],[],[],1,1] exec "ai.sqs"
To create a squad, You have to place a single unit on the map, and type this into their init field:-
whateveryoucallyourgrp = group this;deletevehicle this
This sets up the unit as a placeholder, and will not be visible when the mission starts, but when the spawn script executes (through a trigger), it will use the unit as a placeholder for the spawned squad. This script creates four Units - and then it will execute the AI Script on them - Bear in mind tht you do need to set-up the editor correctly, By placing 3 triggers on the map - 1 activated by west, 1 activated by east and 1 by resistance.
In the West Trigger:-
Radius = As big as mission area, or map
West present
Condition:- this
Onactivation :- aiwest = thislist
Radius = As big as mission area, or map
East present
OnActivation :- aieast = thislist
Radius = As big as mission area, or map
Resistance Present
Condition :- this
OnActivation :- aiguer = thislist
Also be aware tht units from both sides need to be present on the map @ mission start up, otherwise it will error - 1 squad from each side.
1 west side (Playable Squad)
1 AI East or Res side
Or vice versa, then just set up triggers to call your spawn scripts:-
West present
Onactivation :- this
Condition:- [] exec "spawn.sqs"
Here is the "Disperse.sqs"
_shooter = _this select 0
_weapon = _this select 1
_muzzle = _this select 2
_mode = _this select 3
_shell = _this select 4
;Obtain the bullet and details.
_bullet = NearestObject [_shooter,_shell]
;Creating velocity array.
_velocity = Velocity _bullet
_x1 = _velocity Select 0
_y1 = _velocity Select 1
_z1 = _velocity Select 2
;New x value.
_variable1 = Random 10
?(_variable1 > 5): _polarity1 = -2
?(_variable1 < 5): _polarity1 = +2
_x2 = _x1 + ((Random 20) * _polarity1)
;New y value.
_variable2 = Random 10
?(_variable2 > 5): _polarity2 = -2
?(_variable2 < 5): _polarity2 = +2
_y2 = _y1 + ((Random 20) * _polarity2)
;New y value.
_variable3 = Random 10
?(_variable3 > 5): _polarity3 = -1
?(_variable3 < 5): _polarity3 = +1
_z2 = _z1 + ((Random 30) * _polarity3)
;New velocity.
_velocity2 = [_x2,_y2,_z2]
_bullet SetVelocity _velocity2
~0
Exit
And this is the "curelag.sqs"
_unit = _this select 0
_unit removealleventhandlers "killed"
exit
I hope this answers the question